Skip to main content

Install OpenCUDA-Lab 0.1 (exportable preview)

This is not a frozen production ABI (SOVERSION is still 0).

The PyPI package is a source distribution. pip install opencudalab compiles libopencuda on that machine. A Mac wheel is never the CUDA artifact.

pip (the real export)

On a Windows/Linux box with NVIDIA GPU, CUDA toolkit, a C/C++ compiler, and CMake:

pip install opencudalab
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
python -m opencudalab --compare --batches 8

If CUDA is on PATH (nvcc), the GPU backends are built automatically. Force the mock backend: set OCL_FORCE_MOCK=1 before pip install.

Until the project is published to PyPI, the same command works from a clone:

pip install .

USB tarball (no GitHub / no PyPI yet)

./scripts/pack_v1.sh

Copy dist/opencudalab-0.1.0-usb.tar.gz. Do not copy a Mac .dylib.

Windows + NVIDIA + CUDA (friend laptop)

Needs: NVIDIA GPU, CUDA Toolkit, Visual Studio 2022 Build Tools (C++ workload), Python 3.10+, CMake on PATH (winget install Kitware.CMake).

In x64 Native Tools Command Prompt or a terminal where nvcc works:

tar -xf opencudalab-0.1.0.tar.gz
cd opencudalab-0.1.0

python -m venv .venv
.venv\Scripts\activate
python -m pip install -U pip

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

pip install opencudalab

Then the with-vs-without comparison:

python -m opencudalab --compare --batches 8

Or without pip, CMake + the example:

cmake -S . -B build -DOCL_ENABLE_CUDA=ON
cmake --build build --config Release
python examples/python/resnet_cifar10.py --compare --lib build\Release\opencuda.dll

If native Windows build fights you, WSL2 Ubuntu + CUDA on WSL is the same Linux path as the paper's GPU box:

cmake -S . -B build -DOCL_ENABLE_CUDA=ON && cmake --build build -j
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
python examples/python/resnet_cifar10.py --compare --lib build/libopencuda.so

Look at torch_peak_alloc_MiB and ocl_n_oom_actual in the table.


pip (Mac / Linux)

From this repo, or from PyPI after publish:

pip install opencudalab
python -c "import opencudalab; print(opencudalab.library_path())"
python -m opencudalab --cpu --compare --dataset synthetic

On this Mac that installs the mock backend (no NVIDIA GPU).

To publish the source distribution (maintainers):

./scripts/publish_pypi.sh           # build + print upload commands
./scripts/publish_pypi.sh --test    # TestPyPI (needs token)
./scripts/publish_pypi.sh --upload  # PyPI (needs token)

Homebrew (macOS, mock backend only)

brew install cmake
./scripts/pack_v1.sh
brew install --build-from-source ./packaging/homebrew/opencudalab.rb

Python API (0.1.2+)

opencudalab.Runtime / Pipeline wrap the C ABI. ctypes layouts are not part of notebooks. Mock-backend checks (no GPU):

cmake -S . -B build -DOCL_ENABLE_CUDA=OFF
cmake --build build -j
PYTHONPATH=python pytest tests/python/test_api.py

C / pkg-config

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
cmake --install build --prefix /usr/local
pkg-config --libs --cflags opencuda

Java (JNA, same DLL/.so/.dylib)

cd bindings/java
mvn -q package
# Windows: put opencuda.dll on PATH or java.library.path
mvn -q exec:java

Metadata

Release files for opencudalab 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opencudalab 0.1.2
File Size Uploaded Provenance
opencudalab-0.1.2.tar.gz 35.5 MB Without provenance Details

Release files / opencudalab-0.1.2.tar.gz

Download URL opencudalab-0.1.2.tar.gz
Size 35.5 MB
Tags Source
SHA-256 checksum
How to use checksums
8c187f6474d7f48fab785f1535985406cd8774183f9aca9711ffeeaf4ab2b823
BLAKE2b-256 checksum
How to use checksums
c6781da8d924513a48e821571ab2389c4e2e4d81437bc440df4493ca037a5705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for opencudalab 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page