Development Status
- 3 - Alpha
Intended Audience
- Developers
- Science/Research
Programming Language
- Python :: 3
- C++
Topic
- Scientific/Engineering
- Multimedia :: Graphics :: 3D Rendering
Operating System
- Microsoft :: Windows
- POSIX :: Linux
pyoptix-contrib
Community-maintained Python bindings for NVIDIA OptiX, forked from NVIDIA/otk-pyoptix.
This fork adds support for OptiX 9.1 features including cluster acceleration structures and cooperative vectors.
Requirements
- OptiX SDK 7.6 or newer (9.1+ for cluster accel / coop vec features)
- CUDA Toolkit 12.6 or newer
- CMake
- A C++17 compiler
Installation
export OptiX_INSTALL_DIR=/path/to/OptiX-SDK
pip install pyoptix-contrib
On Windows (PowerShell):
$env:OptiX_INSTALL_DIR = 'C:\ProgramData\NVIDIA Corporation\OptiX SDK 9.1.0'
pip install pyoptix-contrib
The package builds from source via CMake, so the OptiX SDK must be available at install time.
For additional CMake arguments, use the PYOPTIX_CMAKE_ARGS environment variable.
Usage
import optix
# Create a device context
ctx = optix.deviceContextCreate(cuda_context, optix.DeviceContextOptions())
# Query device properties
rtcore_version = optix.deviceContextGetProperty(
ctx, optix.DeviceProperty.DEVICE_PROPERTY_RTCORE_VERSION
)
See the examples directory for complete samples including triangle rendering, curves, denoising, and motion blur.
What's New in This Fork
- OptiX 9.1 support: Conditional compilation via
IF_OPTIX91macro - Cluster acceleration structures: Enums, structs, and host functions (
clusterAccelComputeMemoryUsage,clusterAccelBuild) - Cooperative vectors: Element types, matrix layouts, and description structs
- New primitive types: ROCAPS curve variants and associated flags
allowClusteredGeometrypipeline compile option- New device properties:
COOP_VEC,CLUSTER_ACCEL, max cluster vertices/triangles/SBT index/clusters-per-GAS
Windows: CUDA DLL Loading (Python 3.8+)
Python 3.8+ on Windows no longer uses PATH to find DLLs. PyOptiX will auto-detect CUDA from the CUDA_PATH environment variable. If auto-detection fails, set CUDA_BIN_DIR:
$env:CUDA_BIN_DIR = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin'
License
BSD 3-Clause. See LICENSE.txt.
Acknowledgments
Original work by Keith Morley and NVIDIA Corporation (NVIDIA/otk-pyoptix).
Wheel compatibility matrix
| Platform | CPython 3.10 | CPython 3.11 | CPython 3.12 | CPython 3.13 | CPython 3.14 |
|---|---|---|---|---|---|
| manylinux_2_27_x86_64 | |||||
| manylinux_2_28_x86_64 |