tensoracle 1.2.0__tar.gz → 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tensoracle-1.2.0/README.md → tensoracle-1.4.0/PKG-INFO +68 -3
- tensoracle-1.2.0/PKG-INFO → tensoracle-1.4.0/README.md +35 -32
- {tensoracle-1.2.0 → tensoracle-1.4.0}/cpp/CMakeLists.txt +7 -2
- {tensoracle-1.2.0 → tensoracle-1.4.0}/cpp/cmake/TensoracleCubinPlugin.cmake +9 -3
- tensoracle-1.4.0/cpp/cmake/TensoracleCuda.cmake +119 -0
- tensoracle-1.4.0/docs/api/producer.md +11 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/index.md +5 -3
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/tensorrt-sdk.md +24 -8
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/README.md +12 -7
- {tensoracle-1.2.0 → tensoracle-1.4.0}/pyproject.toml +7 -1
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_version.py +2 -2
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/producer.py +15 -11
- tensoracle-1.4.0/tests/cubin_io/kernels.cu +17 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/native/CMakeLists.txt +10 -4
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/native_build.py +13 -0
- tensoracle-1.4.0/tests/test_cmake_cuda.py +199 -0
- tensoracle-1.4.0/tests/test_cmake_plugin.py +201 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_cpp_core.py +6 -5
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_example_plugin.py +6 -2
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_plugin_io.py +3 -3
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_producer.py +69 -33
- {tensoracle-1.2.0 → tensoracle-1.4.0}/uv.lock +78 -15
- tensoracle-1.2.0/docs/api/producer.md +0 -7
- tensoracle-1.2.0/tests/cubin_io/kernels.cu +0 -11
- tensoracle-1.2.0/tests/test_cmake_plugin.py +0 -56
- {tensoracle-1.2.0 → tensoracle-1.4.0}/.gitignore +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/LICENSE +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/build_backend.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/cpp/include/tensoracle/cubin_plugin.hpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/cpp/src/cubin_plugin.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/cpp/tests/core.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/api/bundle.md +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/api/index.md +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/cpp-python-repositories.md +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/optimization.md +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/docs/precision.md +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/CMakeLists.txt +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/bundle.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/bundle.json +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm120/bias.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.specialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.tf32-control.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.unspecialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm120/scale.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm86/bias.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.specialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.tf32-control.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.unspecialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm86/scale.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm89/bias.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.specialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.tf32-control.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.unspecialized.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/bundle/cubins/sm89/scale.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/example_cubin_plugin/__init__.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/example_cubin_plugin/weights.safetensors +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/kernels.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/plugin.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/examples/cubin_plugin/pyproject.toml +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/mkdocs.yml +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/__init__.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_build.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_cache.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_comparison.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_execution.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_memory.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/_plugins.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/bundle.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/src/tensoracle/convert.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/build_memory_runtime.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/cubin_io/check.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/cubin_io/plugin.cpp +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/cubins/ptxas-12.9.86/sm120.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/cubins/ptxas-12.9.86/sm86.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/cubins/ptxas-12.9.86/sm89.cubin +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/example_runtime.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/native/export.h +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/plugin_io_runtime.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/precision_runtime.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_build.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_build_memory.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_bundle.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_cache.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_comparison.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_convert.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_cuda_graphs.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_distribution.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_engine_io.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_execution.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_gpu_cache.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_plugins.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_precision.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_shape_tensor_outputs.py +0 -0
- {tensoracle-1.2.0 → tensoracle-1.4.0}/tests/test_weight_hash.py +0 -0
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: tensoracle
|
|
3
|
+
Version: 1.4.0
|
|
4
|
+
Summary: Build, save, reuse, and execute TensorRT engines from safetensors weights
|
|
5
|
+
Project-URL: documentation, https://sync-dev-org.github.io/tensoracle/
|
|
6
|
+
Project-URL: repository, https://github.com/sync-dev-org/tensoracle
|
|
7
|
+
Project-URL: issues, https://github.com/sync-dev-org/tensoracle/issues
|
|
8
|
+
Author-email: minamik <mia@sync.dev>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 13
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Requires-Python: <3.14,>=3.12
|
|
21
|
+
Requires-Dist: numpy>=2.0
|
|
22
|
+
Requires-Dist: safetensors>=0.4
|
|
23
|
+
Requires-Dist: tensorrt-cu13<12,>=11.0
|
|
24
|
+
Provides-Extra: convert
|
|
25
|
+
Requires-Dist: torch>=2.6; extra == 'convert'
|
|
26
|
+
Provides-Extra: producer
|
|
27
|
+
Requires-Dist: nvidia-cuda-crt==13.2.*; extra == 'producer'
|
|
28
|
+
Requires-Dist: nvidia-cuda-cuobjdump==13.2.*; extra == 'producer'
|
|
29
|
+
Requires-Dist: nvidia-cuda-nvcc==13.2.*; extra == 'producer'
|
|
30
|
+
Requires-Dist: nvidia-nvvm==13.2.*; extra == 'producer'
|
|
31
|
+
Requires-Dist: triton==3.8.0; extra == 'producer'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
1
34
|
# tensoracle
|
|
2
35
|
|
|
3
36
|
Build and execute TensorRT engines from graphs defined with TensorRT's Python network API. The graph function owns the model's safetensors weights and tensor types. Engine building, engine reuse, execution, and output comparison do not require torch. Only the optional `.pth` checkpoint converter requires torch, installed with `tensoracle[convert]`.
|
|
@@ -14,7 +47,7 @@ Choose the path that matches your work:
|
|
|
14
47
|
| --- | --- | --- |
|
|
15
48
|
| Inference application | [Reopen a saved engine](#use-a-saved-engine-for-inference) and enqueue it with `handle.create_execution()`. | The application supplies device buffers and CUDA streams, for example through CuPy or `cuda-python`. |
|
|
16
49
|
| Standard graph developer | [Define and build a graph](#define-and-build-a-standard-graph), [save and reopen](#save-and-reopen-an-engine), and [compare outputs](#compare-output-arrays). | None for standard TensorRT layers. |
|
|
17
|
-
| Cubin plugin developer | [Build a cubin plugin](#build-a-cubin-plugin) and package it with the model. | `tensoracle[producer]`, CUDA
|
|
50
|
+
| Cubin plugin developer | [Build a cubin plugin](#build-a-cubin-plugin) and package it with the model. | `tensoracle[producer]`, PyPI CUDA headers, TensorRT SDK, CMake 3.20 or later, and a C++17 compiler. |
|
|
18
51
|
|
|
19
52
|
| Requirement | Inference application | Standard graph developer | Cubin plugin developer |
|
|
20
53
|
| --- | --- | --- | --- |
|
|
@@ -23,7 +56,7 @@ Choose the path that matches your work:
|
|
|
23
56
|
| NVIDIA GPU and driver | Open and run engines | Build and run engines | Run and test engines; cubin production itself can run without a GPU |
|
|
24
57
|
| CuPy or `cuda-python` | The application chooses its buffer and stream library | The application chooses its buffer and stream library | `cuda-python` is used by the example runtime and tests, not by `tensoracle` |
|
|
25
58
|
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
26
|
-
| CUDA
|
|
59
|
+
| PyPI CUDA tools and headers | Not needed | Not needed | `tensoracle[producer]` supplies cubin tools; `nvidia-cuda-nvcc` and `nvidia-cuda-runtime` 13.2 supply the native build inputs |
|
|
27
60
|
| TensorRT 11 SDK | Not needed | Not needed | Native plugin build |
|
|
28
61
|
| CMake 3.20 or later and C++17 compiler | Not needed | Not needed | Native plugin build |
|
|
29
62
|
|
|
@@ -315,10 +348,32 @@ python/
|
|
|
315
348
|
|
|
316
349
|
Keep C++ sources in `cpp/`, with a CMake project that builds and runs its tests through CTest without Python. Keep the Python project, its src-layout package, and its uv environment in `python/`; run the project's uv commands from that directory. Tensoracle itself follows this layout, and the installed C++ helper paths described below remain inside its Python package.
|
|
317
350
|
|
|
318
|
-
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the
|
|
351
|
+
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the PyPI `nvidia-cuda-nvcc` and `nvidia-cuda-cuobjdump` wheels. The extra pins those tools, `nvidia-cuda-crt`, and `nvidia-nvvm` to the 13.2 series. It does not read `CUDA_HOME`; explicit `ptxas` and `cuobjdump` paths override the wheel defaults independently. A missing tool identifies its package and searched path and explains how to install the extra or pass a path. The normal import, engine build, and engine reuse paths do not import the producer or Triton. Cubin production does not need a GPU or import torch; run it without importing torch first. The caller supplies Triton functions and `KernelSpec` records with their public argument types, compile time constants, and any divisibility assumptions. The producer writes sm86, sm89, and sm120 cubins, `bundle.json`, and a C++ translation unit that embeds exactly those cubins. The generated C++ entry records carry each public argument's order, type, count, and divisibility rule into the common launcher. It rejects an unexpected parameter ABI or nonzero scratch requirement. The included [example](https://github.com/sync-dev-org/tensoracle/blob/main/examples/cubin_plugin/README.md#rebuild-the-cubins) has the command to rebuild its cubins from a repository clone.
|
|
352
|
+
|
|
353
|
+
Neither cubin production nor native plugin building requires an OS-installed CUDA Toolkit. For the native build, install PyPI `nvidia-cuda-nvcc==13.2.*` and `nvidia-cuda-runtime==13.2.*`, then pass their `site-packages/nvidia/cu13` directory as `CUDAToolkit_ROOT` (a CMake variable or environment variable). The helper uses its `cuda.h` and links the NVIDIA driver's `libcuda.so` on Linux, including `/usr/lib/wsl/lib/libcuda.so` on WSL, or the wheel's `lib/x64/cuda.lib` on Windows. TensorRT headers still come from the separately prepared SDK. The [SDK guide](https://github.com/sync-dev-org/tensoracle/blob/main/docs/tensorrt-sdk.md#5-pass-the-verified-root-to-the-build-and-tests) gives the setup commands. An explicit OS Toolkit root and the existing default locations remain supported for native builds.
|
|
319
354
|
|
|
320
355
|
The wheel also contains `tensoracle/cpp/include`, `tensoracle/cpp/src`, and `tensoracle/cpp/cmake`. Pass the installed `tensoracle/cpp` directory to CMake as `TENSORACLE_CPP_ROOT` and include `TensoracleCubinPlugin.cmake`. Its `tensoracle_add_cubin_plugin` function compiles the common C++ source, the caller's plugin source, and the generated `bundle.cpp` into the caller's library. The caller implements the graph's meaning, field meanings, weight placement, launch sequence, and variant selection. The common source owns typed fields in their original order, handles `IPluginV3` lifecycle methods, checks cubin digests and resources, loads one module per CUDA context, checks the generated argument count and specialization rules, appends the two supported zero scratch pointers, and launches kernels. The caller selects a variant using `Kernel::accepts` and derives the count passed to `Kernel::launch` from its argument array. The common source releases modules and device allocations in their owning contexts. The library must export TensorRT's `getCreators`; a static registration constructor is not supported.
|
|
321
356
|
|
|
357
|
+
To record the CUDA inputs used by the plugin build, call `tensoracle_find_cuda` from `TensoracleCuda.cmake` (also included by `TensoracleCubinPlugin.cmake`):
|
|
358
|
+
|
|
359
|
+
```cmake
|
|
360
|
+
include("${TENSORACLE_CPP_ROOT}/cmake/TensoracleCuda.cmake")
|
|
361
|
+
tensoracle_find_cuda(
|
|
362
|
+
OUT_INCLUDE_DIR cuda_include
|
|
363
|
+
OUT_DRIVER_LIBRARY cuda_driver)
|
|
364
|
+
message(STATUS "CUDA headers: ${cuda_include}")
|
|
365
|
+
message(STATUS "CUDA driver link library: ${cuda_driver}")
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Both keywords are required and name variables set in the calling scope: `cuda_include` receives the directory containing `cuda.h`, and `cuda_driver` receives the driver link library's path. Unknown arguments are rejected. The function uses the same `CUDAToolkit_ROOT` CMake variable, environment variable, and default locations as `tensoracle_add_cubin_plugin`, and reports the same error when an input is missing. You can call it repeatedly, before or after adding the plugin.
|
|
369
|
+
|
|
370
|
+
The function also makes the public IMPORTED target `tensoracle_cuda_driver` available. Link another CMake target to it to inherit the same include directory and driver library:
|
|
371
|
+
|
|
372
|
+
```cmake
|
|
373
|
+
add_library(cuda_consumer SHARED cuda_consumer.cpp)
|
|
374
|
+
target_link_libraries(cuda_consumer PRIVATE tensoracle_cuda_driver)
|
|
375
|
+
```
|
|
376
|
+
|
|
322
377
|
`tensoracle::cubin::PluginBase` accepts a `PluginIO` declaration as its fourth constructor argument. `inputs` lists one `TensorSpec` per input in network order; each spec declares a TensorRT `type` and `format`. `output` declares the single output's type and format, and `shape_input_index` selects the input whose shape the output copies. For example, declare two fp16 / HWC8 inputs and one fp16 / HWC8 output with the shape of input 0:
|
|
323
378
|
|
|
324
379
|
```cpp
|
|
@@ -366,6 +421,16 @@ On 2026-10-18, the test suite and a native plugin build were run on Windows:
|
|
|
366
421
|
|
|
367
422
|
On Windows, the standalone `cpp/` build and CTest passed, the CMake helper built the example plugin DLL against `nvinfer_11.lib`, and the plugin engine was built and reused in a separate process. The `py3-none-any` wheel built on Linux was installed unchanged on Windows. With `PATH` reduced to the Windows system directories and no CUDA or TensorRT SDK paths, the driver's `nvcuda.dll` and the pip-installed TensorRT runtime were sufficient to build and reuse engines.
|
|
368
423
|
|
|
424
|
+
On 2026-10-27, `python/tests/test_example_plugin.py` was run on each GPU below with the example cubin bundle (digest `207d41310c87ae8b75b0301e881df881cdd2475eec07b82092e0ec66febbd5c0`). Each example wheel was built with TensorRT SDK `11.2.1.2` and tested with TensorRT runtime `11.4.0.106` (`tensorrt-cu13`). These runs cover one SDK/runtime pair per GPU, separately from the 25-pair matrix above. `inspect_wheel` confirmed that each wheel's library embeds cubins from this bundle.
|
|
425
|
+
|
|
426
|
+
| GPU | Result | Python | OS / glibc / kernel / NVIDIA driver | CUDA toolkit (plugin build) |
|
|
427
|
+
| --- | --- | --- | --- | --- |
|
|
428
|
+
| NVIDIA RTX PRO 4000 Blackwell (sm120) | 7 passed, 0 failed, 0 skipped | 3.13.15 | WSL2 / glibc 2.43 / `6.18.54.1-microsoft-standard-WSL2` / 616.92 | 13.3 |
|
|
429
|
+
| NVIDIA RTX 6000 Ada Generation (sm89) | 7 passed, 0 failed, 0 skipped | 3.13.15 | WSL2 / glibc 2.43 / `6.18.33.2-microsoft-standard-WSL2` / 596.72 | 13.2.86 |
|
|
430
|
+
| NVIDIA RTX A6000 (sm86) | 7 passed, 0 failed, 0 skipped | 3.13.7 | WSL2 / glibc 2.39 / `6.18.54.1-microsoft-standard-WSL2` / 597.16 | 13.0.88 |
|
|
431
|
+
|
|
432
|
+
The tests built and installed the example wheel in a temporary runtime environment, built and ran both plugins, reused a saved TensorRT engine in a separate process without calling the graph, selected a different engine cache entry when the plugin library changed, ran concurrently in two CUDA contexts, compared fp32 and TF32, and rejected a library embedding a different bundle.
|
|
433
|
+
|
|
369
434
|
Native Linux, other kernels, Windows with sm86 or sm120, and TensorRT 11 versions not listed here have not been tested.
|
|
370
435
|
|
|
371
436
|
## Compare output arrays
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: tensoracle
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: Build, save, reuse, and execute TensorRT engines from safetensors weights
|
|
5
|
-
Project-URL: documentation, https://sync-dev-org.github.io/tensoracle/
|
|
6
|
-
Project-URL: repository, https://github.com/sync-dev-org/tensoracle
|
|
7
|
-
Project-URL: issues, https://github.com/sync-dev-org/tensoracle/issues
|
|
8
|
-
Author-email: minamik <mia@sync.dev>
|
|
9
|
-
License-Expression: MIT
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
-
Classifier: Environment :: GPU :: NVIDIA CUDA :: 13
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
-
Requires-Python: <3.14,>=3.12
|
|
21
|
-
Requires-Dist: numpy>=2.0
|
|
22
|
-
Requires-Dist: safetensors>=0.4
|
|
23
|
-
Requires-Dist: tensorrt-cu13<12,>=11.0
|
|
24
|
-
Provides-Extra: convert
|
|
25
|
-
Requires-Dist: torch>=2.6; extra == 'convert'
|
|
26
|
-
Provides-Extra: producer
|
|
27
|
-
Requires-Dist: triton==3.8.0; extra == 'producer'
|
|
28
|
-
Description-Content-Type: text/markdown
|
|
29
|
-
|
|
30
1
|
# tensoracle
|
|
31
2
|
|
|
32
3
|
Build and execute TensorRT engines from graphs defined with TensorRT's Python network API. The graph function owns the model's safetensors weights and tensor types. Engine building, engine reuse, execution, and output comparison do not require torch. Only the optional `.pth` checkpoint converter requires torch, installed with `tensoracle[convert]`.
|
|
@@ -43,7 +14,7 @@ Choose the path that matches your work:
|
|
|
43
14
|
| --- | --- | --- |
|
|
44
15
|
| Inference application | [Reopen a saved engine](#use-a-saved-engine-for-inference) and enqueue it with `handle.create_execution()`. | The application supplies device buffers and CUDA streams, for example through CuPy or `cuda-python`. |
|
|
45
16
|
| Standard graph developer | [Define and build a graph](#define-and-build-a-standard-graph), [save and reopen](#save-and-reopen-an-engine), and [compare outputs](#compare-output-arrays). | None for standard TensorRT layers. |
|
|
46
|
-
| Cubin plugin developer | [Build a cubin plugin](#build-a-cubin-plugin) and package it with the model. | `tensoracle[producer]`, CUDA
|
|
17
|
+
| Cubin plugin developer | [Build a cubin plugin](#build-a-cubin-plugin) and package it with the model. | `tensoracle[producer]`, PyPI CUDA headers, TensorRT SDK, CMake 3.20 or later, and a C++17 compiler. |
|
|
47
18
|
|
|
48
19
|
| Requirement | Inference application | Standard graph developer | Cubin plugin developer |
|
|
49
20
|
| --- | --- | --- | --- |
|
|
@@ -52,7 +23,7 @@ Choose the path that matches your work:
|
|
|
52
23
|
| NVIDIA GPU and driver | Open and run engines | Build and run engines | Run and test engines; cubin production itself can run without a GPU |
|
|
53
24
|
| CuPy or `cuda-python` | The application chooses its buffer and stream library | The application chooses its buffer and stream library | `cuda-python` is used by the example runtime and tests, not by `tensoracle` |
|
|
54
25
|
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
55
|
-
| CUDA
|
|
26
|
+
| PyPI CUDA tools and headers | Not needed | Not needed | `tensoracle[producer]` supplies cubin tools; `nvidia-cuda-nvcc` and `nvidia-cuda-runtime` 13.2 supply the native build inputs |
|
|
56
27
|
| TensorRT 11 SDK | Not needed | Not needed | Native plugin build |
|
|
57
28
|
| CMake 3.20 or later and C++17 compiler | Not needed | Not needed | Native plugin build |
|
|
58
29
|
|
|
@@ -344,10 +315,32 @@ python/
|
|
|
344
315
|
|
|
345
316
|
Keep C++ sources in `cpp/`, with a CMake project that builds and runs its tests through CTest without Python. Keep the Python project, its src-layout package, and its uv environment in `python/`; run the project's uv commands from that directory. Tensoracle itself follows this layout, and the installed C++ helper paths described below remain inside its Python package.
|
|
346
317
|
|
|
347
|
-
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the
|
|
318
|
+
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the PyPI `nvidia-cuda-nvcc` and `nvidia-cuda-cuobjdump` wheels. The extra pins those tools, `nvidia-cuda-crt`, and `nvidia-nvvm` to the 13.2 series. It does not read `CUDA_HOME`; explicit `ptxas` and `cuobjdump` paths override the wheel defaults independently. A missing tool identifies its package and searched path and explains how to install the extra or pass a path. The normal import, engine build, and engine reuse paths do not import the producer or Triton. Cubin production does not need a GPU or import torch; run it without importing torch first. The caller supplies Triton functions and `KernelSpec` records with their public argument types, compile time constants, and any divisibility assumptions. The producer writes sm86, sm89, and sm120 cubins, `bundle.json`, and a C++ translation unit that embeds exactly those cubins. The generated C++ entry records carry each public argument's order, type, count, and divisibility rule into the common launcher. It rejects an unexpected parameter ABI or nonzero scratch requirement. The included [example](https://github.com/sync-dev-org/tensoracle/blob/main/examples/cubin_plugin/README.md#rebuild-the-cubins) has the command to rebuild its cubins from a repository clone.
|
|
319
|
+
|
|
320
|
+
Neither cubin production nor native plugin building requires an OS-installed CUDA Toolkit. For the native build, install PyPI `nvidia-cuda-nvcc==13.2.*` and `nvidia-cuda-runtime==13.2.*`, then pass their `site-packages/nvidia/cu13` directory as `CUDAToolkit_ROOT` (a CMake variable or environment variable). The helper uses its `cuda.h` and links the NVIDIA driver's `libcuda.so` on Linux, including `/usr/lib/wsl/lib/libcuda.so` on WSL, or the wheel's `lib/x64/cuda.lib` on Windows. TensorRT headers still come from the separately prepared SDK. The [SDK guide](https://github.com/sync-dev-org/tensoracle/blob/main/docs/tensorrt-sdk.md#5-pass-the-verified-root-to-the-build-and-tests) gives the setup commands. An explicit OS Toolkit root and the existing default locations remain supported for native builds.
|
|
348
321
|
|
|
349
322
|
The wheel also contains `tensoracle/cpp/include`, `tensoracle/cpp/src`, and `tensoracle/cpp/cmake`. Pass the installed `tensoracle/cpp` directory to CMake as `TENSORACLE_CPP_ROOT` and include `TensoracleCubinPlugin.cmake`. Its `tensoracle_add_cubin_plugin` function compiles the common C++ source, the caller's plugin source, and the generated `bundle.cpp` into the caller's library. The caller implements the graph's meaning, field meanings, weight placement, launch sequence, and variant selection. The common source owns typed fields in their original order, handles `IPluginV3` lifecycle methods, checks cubin digests and resources, loads one module per CUDA context, checks the generated argument count and specialization rules, appends the two supported zero scratch pointers, and launches kernels. The caller selects a variant using `Kernel::accepts` and derives the count passed to `Kernel::launch` from its argument array. The common source releases modules and device allocations in their owning contexts. The library must export TensorRT's `getCreators`; a static registration constructor is not supported.
|
|
350
323
|
|
|
324
|
+
To record the CUDA inputs used by the plugin build, call `tensoracle_find_cuda` from `TensoracleCuda.cmake` (also included by `TensoracleCubinPlugin.cmake`):
|
|
325
|
+
|
|
326
|
+
```cmake
|
|
327
|
+
include("${TENSORACLE_CPP_ROOT}/cmake/TensoracleCuda.cmake")
|
|
328
|
+
tensoracle_find_cuda(
|
|
329
|
+
OUT_INCLUDE_DIR cuda_include
|
|
330
|
+
OUT_DRIVER_LIBRARY cuda_driver)
|
|
331
|
+
message(STATUS "CUDA headers: ${cuda_include}")
|
|
332
|
+
message(STATUS "CUDA driver link library: ${cuda_driver}")
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Both keywords are required and name variables set in the calling scope: `cuda_include` receives the directory containing `cuda.h`, and `cuda_driver` receives the driver link library's path. Unknown arguments are rejected. The function uses the same `CUDAToolkit_ROOT` CMake variable, environment variable, and default locations as `tensoracle_add_cubin_plugin`, and reports the same error when an input is missing. You can call it repeatedly, before or after adding the plugin.
|
|
336
|
+
|
|
337
|
+
The function also makes the public IMPORTED target `tensoracle_cuda_driver` available. Link another CMake target to it to inherit the same include directory and driver library:
|
|
338
|
+
|
|
339
|
+
```cmake
|
|
340
|
+
add_library(cuda_consumer SHARED cuda_consumer.cpp)
|
|
341
|
+
target_link_libraries(cuda_consumer PRIVATE tensoracle_cuda_driver)
|
|
342
|
+
```
|
|
343
|
+
|
|
351
344
|
`tensoracle::cubin::PluginBase` accepts a `PluginIO` declaration as its fourth constructor argument. `inputs` lists one `TensorSpec` per input in network order; each spec declares a TensorRT `type` and `format`. `output` declares the single output's type and format, and `shape_input_index` selects the input whose shape the output copies. For example, declare two fp16 / HWC8 inputs and one fp16 / HWC8 output with the shape of input 0:
|
|
352
345
|
|
|
353
346
|
```cpp
|
|
@@ -395,6 +388,16 @@ On 2026-10-18, the test suite and a native plugin build were run on Windows:
|
|
|
395
388
|
|
|
396
389
|
On Windows, the standalone `cpp/` build and CTest passed, the CMake helper built the example plugin DLL against `nvinfer_11.lib`, and the plugin engine was built and reused in a separate process. The `py3-none-any` wheel built on Linux was installed unchanged on Windows. With `PATH` reduced to the Windows system directories and no CUDA or TensorRT SDK paths, the driver's `nvcuda.dll` and the pip-installed TensorRT runtime were sufficient to build and reuse engines.
|
|
397
390
|
|
|
391
|
+
On 2026-10-27, `python/tests/test_example_plugin.py` was run on each GPU below with the example cubin bundle (digest `207d41310c87ae8b75b0301e881df881cdd2475eec07b82092e0ec66febbd5c0`). Each example wheel was built with TensorRT SDK `11.2.1.2` and tested with TensorRT runtime `11.4.0.106` (`tensorrt-cu13`). These runs cover one SDK/runtime pair per GPU, separately from the 25-pair matrix above. `inspect_wheel` confirmed that each wheel's library embeds cubins from this bundle.
|
|
392
|
+
|
|
393
|
+
| GPU | Result | Python | OS / glibc / kernel / NVIDIA driver | CUDA toolkit (plugin build) |
|
|
394
|
+
| --- | --- | --- | --- | --- |
|
|
395
|
+
| NVIDIA RTX PRO 4000 Blackwell (sm120) | 7 passed, 0 failed, 0 skipped | 3.13.15 | WSL2 / glibc 2.43 / `6.18.54.1-microsoft-standard-WSL2` / 616.92 | 13.3 |
|
|
396
|
+
| NVIDIA RTX 6000 Ada Generation (sm89) | 7 passed, 0 failed, 0 skipped | 3.13.15 | WSL2 / glibc 2.43 / `6.18.33.2-microsoft-standard-WSL2` / 596.72 | 13.2.86 |
|
|
397
|
+
| NVIDIA RTX A6000 (sm86) | 7 passed, 0 failed, 0 skipped | 3.13.7 | WSL2 / glibc 2.39 / `6.18.54.1-microsoft-standard-WSL2` / 597.16 | 13.0.88 |
|
|
398
|
+
|
|
399
|
+
The tests built and installed the example wheel in a temporary runtime environment, built and ran both plugins, reused a saved TensorRT engine in a separate process without calling the graph, selected a different engine cache entry when the plugin library changed, ran concurrently in two CUDA contexts, compared fp32 and TF32, and rejected a library embedding a different bundle.
|
|
400
|
+
|
|
398
401
|
Native Linux, other kernels, Windows with sm86 or sm120, and TensorRT 11 versions not listed here have not been tested.
|
|
399
402
|
|
|
400
403
|
## Compare output arrays
|
|
@@ -5,13 +5,18 @@ set(TENSORRT_ROOT "" CACHE PATH "TensorRT 11 SDK root containing include/NvInfer
|
|
|
5
5
|
if(NOT EXISTS "${TENSORRT_ROOT}/include/NvInfer.h")
|
|
6
6
|
message(FATAL_ERROR "TensorRT SDK headers are missing; set TENSORRT_ROOT to the TensorRT 11 SDK")
|
|
7
7
|
endif()
|
|
8
|
-
|
|
8
|
+
include(cmake/TensoracleCuda.cmake)
|
|
9
|
+
_tensoracle_find_cuda()
|
|
9
10
|
|
|
10
11
|
add_library(tensoracle_cubin STATIC src/cubin_plugin.cpp)
|
|
11
12
|
target_compile_features(tensoracle_cubin PUBLIC cxx_std_17)
|
|
12
13
|
target_include_directories(tensoracle_cubin PUBLIC
|
|
13
14
|
"${CMAKE_CURRENT_SOURCE_DIR}/include" "${TENSORRT_ROOT}/include")
|
|
14
|
-
target_link_libraries(tensoracle_cubin PUBLIC
|
|
15
|
+
target_link_libraries(tensoracle_cubin PUBLIC tensoracle_internal_cuda_driver)
|
|
16
|
+
if(NOT WIN32)
|
|
17
|
+
find_package(Threads REQUIRED)
|
|
18
|
+
target_link_libraries(tensoracle_cubin PUBLIC Threads::Threads)
|
|
19
|
+
endif()
|
|
15
20
|
target_compile_options(tensoracle_cubin PRIVATE
|
|
16
21
|
$<$<CXX_COMPILER_ID:GNU,Clang>:-Wno-deprecated-declarations>)
|
|
17
22
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
include_guard(GLOBAL)
|
|
2
|
+
include("${CMAKE_CURRENT_LIST_DIR}/TensoracleCuda.cmake")
|
|
2
3
|
|
|
3
4
|
function(tensoracle_add_cubin_plugin)
|
|
4
5
|
cmake_parse_arguments(ARG "" "TARGET;TENSORRT_ROOT;BUNDLE_ROOT" "SOURCES" ${ARGN})
|
|
@@ -7,7 +8,7 @@ function(tensoracle_add_cubin_plugin)
|
|
|
7
8
|
endif()
|
|
8
9
|
|
|
9
10
|
get_filename_component(_tensoracle_cpp "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/.." ABSOLUTE)
|
|
10
|
-
|
|
11
|
+
_tensoracle_find_cuda()
|
|
11
12
|
find_path(TENSORACLE_NVINFER_INCLUDE NvInfer.h
|
|
12
13
|
PATHS "${ARG_TENSORRT_ROOT}/include" NO_DEFAULT_PATH REQUIRED)
|
|
13
14
|
set(_tensoracle_nvinfer_names nvinfer)
|
|
@@ -26,8 +27,13 @@ function(tensoracle_add_cubin_plugin)
|
|
|
26
27
|
target_compile_options(${ARG_TARGET} PRIVATE
|
|
27
28
|
$<$<CXX_COMPILER_ID:GNU,Clang>:-Wno-deprecated-declarations>)
|
|
28
29
|
target_include_directories(${ARG_TARGET} PRIVATE
|
|
29
|
-
"${_tensoracle_cpp}/include" "${TENSORACLE_NVINFER_INCLUDE}"
|
|
30
|
-
target_link_libraries(${ARG_TARGET} PRIVATE
|
|
30
|
+
"${_tensoracle_cpp}/include" "${TENSORACLE_NVINFER_INCLUDE}")
|
|
31
|
+
target_link_libraries(${ARG_TARGET} PRIVATE
|
|
32
|
+
"${TENSORACLE_NVINFER_LIBRARY}" tensoracle_internal_cuda_driver)
|
|
33
|
+
if(NOT WIN32)
|
|
34
|
+
find_package(Threads REQUIRED)
|
|
35
|
+
target_link_libraries(${ARG_TARGET} PRIVATE Threads::Threads)
|
|
36
|
+
endif()
|
|
31
37
|
set_target_properties(${ARG_TARGET} PROPERTIES
|
|
32
38
|
CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN YES)
|
|
33
39
|
endfunction()
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
include_guard(GLOBAL)
|
|
2
|
+
|
|
3
|
+
# Only the Driver API is needed by the C++ helpers. A PyPI CUDA root has neither
|
|
4
|
+
# the unversioned cudart linker name nor all the headers of a complete toolkit.
|
|
5
|
+
function(_tensoracle_find_cuda)
|
|
6
|
+
if(CUDAToolkit_ROOT)
|
|
7
|
+
set(_roots "${CUDAToolkit_ROOT}")
|
|
8
|
+
elseif(DEFINED ENV{CUDAToolkit_ROOT} AND NOT "$ENV{CUDAToolkit_ROOT}" STREQUAL "")
|
|
9
|
+
set(_roots "$ENV{CUDAToolkit_ROOT}")
|
|
10
|
+
else()
|
|
11
|
+
set(_roots "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}")
|
|
12
|
+
foreach(_compiler IN ITEMS "${CMAKE_CUDA_COMPILER}" "$ENV{CUDACXX}")
|
|
13
|
+
if(EXISTS "${_compiler}")
|
|
14
|
+
get_filename_component(_bin "${_compiler}" DIRECTORY)
|
|
15
|
+
get_filename_component(_root "${_bin}/.." ABSOLUTE)
|
|
16
|
+
list(APPEND _roots "${_root}")
|
|
17
|
+
endif()
|
|
18
|
+
endforeach()
|
|
19
|
+
find_program(_tensoracle_cuda_nvcc NAMES nvcc nvcc.exe)
|
|
20
|
+
if(_tensoracle_cuda_nvcc)
|
|
21
|
+
get_filename_component(_nvcc "${_tensoracle_cuda_nvcc}" REALPATH)
|
|
22
|
+
get_filename_component(_bin "${_nvcc}" DIRECTORY)
|
|
23
|
+
get_filename_component(_root "${_bin}/.." ABSOLUTE)
|
|
24
|
+
list(APPEND _roots "${_root}")
|
|
25
|
+
endif()
|
|
26
|
+
# Remove private find results before CMake writes its cache (CMake 3.20
|
|
27
|
+
# predates find_program/find_library's NO_CACHE option).
|
|
28
|
+
unset(_tensoracle_cuda_nvcc CACHE)
|
|
29
|
+
if(DEFINED ENV{CUDA_PATH})
|
|
30
|
+
list(APPEND _roots "$ENV{CUDA_PATH}")
|
|
31
|
+
endif()
|
|
32
|
+
if(WIN32)
|
|
33
|
+
file(GLOB _defaults "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v*")
|
|
34
|
+
else()
|
|
35
|
+
file(GLOB _defaults "/usr/local/cuda-*")
|
|
36
|
+
list(APPEND _roots "/usr/local/cuda")
|
|
37
|
+
endif()
|
|
38
|
+
list(SORT _defaults COMPARE NATURAL ORDER DESCENDING)
|
|
39
|
+
list(APPEND _roots ${_defaults})
|
|
40
|
+
endif()
|
|
41
|
+
|
|
42
|
+
set(_searched_includes)
|
|
43
|
+
set(_include)
|
|
44
|
+
foreach(_root IN LISTS _roots)
|
|
45
|
+
foreach(_candidate IN ITEMS "${_root}/include" "${_root}/targets/x86_64-linux/include")
|
|
46
|
+
list(APPEND _searched_includes "${_candidate}")
|
|
47
|
+
if(EXISTS "${_candidate}/cuda.h")
|
|
48
|
+
set(_include "${_candidate}")
|
|
49
|
+
set(_selected_root "${_root}")
|
|
50
|
+
break()
|
|
51
|
+
endif()
|
|
52
|
+
endforeach()
|
|
53
|
+
if(_include)
|
|
54
|
+
break()
|
|
55
|
+
endif()
|
|
56
|
+
endforeach()
|
|
57
|
+
set(_root "${_selected_root}")
|
|
58
|
+
if(NOT _include)
|
|
59
|
+
message(FATAL_ERROR "CUDA header cuda.h was not found. Searched: ${_searched_includes}. "
|
|
60
|
+
"Install PyPI nvidia-cuda-nvcc and nvidia-cuda-runtime 13.2 and set "
|
|
61
|
+
"CUDAToolkit_ROOT to their site-packages/nvidia/cu13 directory.")
|
|
62
|
+
endif()
|
|
63
|
+
|
|
64
|
+
if(WIN32)
|
|
65
|
+
set(_driver_paths "${_root}/lib/x64")
|
|
66
|
+
find_library(_tensoracle_cuda_driver_library NAMES cuda
|
|
67
|
+
PATHS ${_driver_paths} NO_DEFAULT_PATH)
|
|
68
|
+
else()
|
|
69
|
+
set(_driver_paths "/usr/lib/wsl/lib" "${_root}/lib64" "${_root}/lib"
|
|
70
|
+
"${_root}/targets/x86_64-linux/lib")
|
|
71
|
+
find_library(_tensoracle_cuda_driver_library NAMES cuda HINTS ${_driver_paths})
|
|
72
|
+
if(NOT _tensoracle_cuda_driver_library)
|
|
73
|
+
list(APPEND _driver_paths "${_root}/lib64/stubs" "${_root}/lib/stubs"
|
|
74
|
+
"${_root}/targets/x86_64-linux/lib/stubs")
|
|
75
|
+
find_library(_tensoracle_cuda_driver_library NAMES cuda
|
|
76
|
+
PATHS ${_driver_paths} NO_DEFAULT_PATH)
|
|
77
|
+
endif()
|
|
78
|
+
endif()
|
|
79
|
+
set(_driver "${_tensoracle_cuda_driver_library}")
|
|
80
|
+
unset(_tensoracle_cuda_driver_library CACHE)
|
|
81
|
+
if(NOT _driver)
|
|
82
|
+
message(FATAL_ERROR "CUDA driver link library was not found. Searched: ${_driver_paths} "
|
|
83
|
+
"and system library directories. Install the NVIDIA driver on Linux; on Windows "
|
|
84
|
+
"install PyPI nvidia-cuda-runtime 13.2 and set CUDAToolkit_ROOT to its "
|
|
85
|
+
"site-packages/nvidia/cu13 directory (lib/x64/cuda.lib).")
|
|
86
|
+
endif()
|
|
87
|
+
message(STATUS "tensoracle CUDA headers: ${_include}")
|
|
88
|
+
message(STATUS "tensoracle CUDA driver: ${_driver}")
|
|
89
|
+
if(NOT TARGET tensoracle_internal_cuda_driver)
|
|
90
|
+
add_library(tensoracle_internal_cuda_driver UNKNOWN IMPORTED GLOBAL)
|
|
91
|
+
set_target_properties(tensoracle_internal_cuda_driver PROPERTIES
|
|
92
|
+
IMPORTED_LOCATION "${_driver}" INTERFACE_INCLUDE_DIRECTORIES "${_include}")
|
|
93
|
+
endif()
|
|
94
|
+
if(NOT TARGET tensoracle_cuda_driver)
|
|
95
|
+
add_library(tensoracle_cuda_driver ALIAS tensoracle_internal_cuda_driver)
|
|
96
|
+
endif()
|
|
97
|
+
set(_tensoracle_cuda_root "${_root}" PARENT_SCOPE)
|
|
98
|
+
endfunction()
|
|
99
|
+
|
|
100
|
+
# Return the same CUDA inputs used by tensoracle_add_cubin_plugin and expose
|
|
101
|
+
# tensoracle_cuda_driver for consumers that only need to link the Driver API.
|
|
102
|
+
function(tensoracle_find_cuda)
|
|
103
|
+
cmake_parse_arguments(PARSE_ARGV 0 ARG "" "OUT_INCLUDE_DIR;OUT_DRIVER_LIBRARY" "")
|
|
104
|
+
if(DEFINED ARG_UNPARSED_ARGUMENTS)
|
|
105
|
+
message(FATAL_ERROR "Unrecognized tensoracle_find_cuda arguments: ${ARG_UNPARSED_ARGUMENTS}")
|
|
106
|
+
endif()
|
|
107
|
+
if(ARG_KEYWORDS_MISSING_VALUES OR
|
|
108
|
+
NOT DEFINED ARG_OUT_INCLUDE_DIR OR "${ARG_OUT_INCLUDE_DIR}" STREQUAL "" OR
|
|
109
|
+
NOT DEFINED ARG_OUT_DRIVER_LIBRARY OR "${ARG_OUT_DRIVER_LIBRARY}" STREQUAL "")
|
|
110
|
+
message(FATAL_ERROR
|
|
111
|
+
"tensoracle_find_cuda requires OUT_INCLUDE_DIR and OUT_DRIVER_LIBRARY variable names")
|
|
112
|
+
endif()
|
|
113
|
+
|
|
114
|
+
_tensoracle_find_cuda()
|
|
115
|
+
get_target_property(_include tensoracle_cuda_driver INTERFACE_INCLUDE_DIRECTORIES)
|
|
116
|
+
get_target_property(_driver tensoracle_cuda_driver IMPORTED_LOCATION)
|
|
117
|
+
set("${ARG_OUT_INCLUDE_DIR}" "${_include}" PARENT_SCOPE)
|
|
118
|
+
set("${ARG_OUT_DRIVER_LIBRARY}" "${_driver}" PARENT_SCOPE)
|
|
119
|
+
endfunction()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Cubin producer API
|
|
2
|
+
|
|
3
|
+
The following names are available from `tensoracle.producer`. Install `tensoracle[producer]` for Triton 3.8.0 and the PyPI CUDA tools; no OS-installed CUDA Toolkit is required. The extra declares `nvidia-cuda-nvcc`, `nvidia-cuda-cuobjdump`, `nvidia-cuda-crt`, and `nvidia-nvvm` in the 13.2 series.
|
|
4
|
+
|
|
5
|
+
`compile_bundle` obtains `ptxas` from `nvidia-cuda-nvcc` at `nvidia/cu13/bin/ptxas` and `cuobjdump` from `nvidia-cuda-cuobjdump` at `nvidia/cu13/bin/cuobjdump` (with `.exe` on Windows). It ignores `CUDA_HOME`. Explicit `ptxas` and `cuobjdump` paths override the defaults independently. A missing wheel or executable reports the package and searched path and explains how to install `tensoracle[producer]` or pass an explicit path. The producer rejects ptxas versions outside `>=13.2,<14` before writing cubins or a manifest.
|
|
6
|
+
|
|
7
|
+
Cubin production does not need a GPU. Triton production runs on Linux; the resulting cubins can also be embedded in a Windows plugin DLL. Normal imports, engine building, and engine reuse do not import the producer or Triton.
|
|
8
|
+
|
|
9
|
+
::: tensoracle.producer.KernelSpec
|
|
10
|
+
|
|
11
|
+
::: tensoracle.producer.compile_bundle
|
|
@@ -18,7 +18,7 @@ Follow [Build a C++ and Python repository](cpp-python-repositories.md) for sourc
|
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| Inference application | Use `open_engine` to reopen a matching saved engine, then enqueue it with `handle.create_execution()`. | The application supplies buffers and streams, for example through CuPy or `cuda-python`. |
|
|
20
20
|
| Standard graph developer | Define a TensorRT graph, build it with `build_serialized_engine` or `open_engine`, and measure outputs with `compare_outputs`. | None for standard TensorRT layers. |
|
|
21
|
-
| Cubin plugin developer | Produce cubins, build a native TensorRT plugin, and package it with the model. | `tensoracle[producer]`, CUDA
|
|
21
|
+
| Cubin plugin developer | Produce cubins, build a native TensorRT plugin, and package it with the model. | `tensoracle[producer]`, PyPI CUDA headers, TensorRT SDK, CMake 3.20 or later, and a C++17 compiler. |
|
|
22
22
|
|
|
23
23
|
| Requirement | Inference application | Standard graph developer | Cubin plugin developer |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
@@ -27,7 +27,7 @@ Follow [Build a C++ and Python repository](cpp-python-repositories.md) for sourc
|
|
|
27
27
|
| NVIDIA GPU and driver | Open and run engines | Build and run engines | Run and test engines; cubin production itself can run without a GPU |
|
|
28
28
|
| CuPy or `cuda-python` | The application chooses its buffer and stream library | The application chooses its buffer and stream library | `cuda-python` is used by the example runtime and tests, not by `tensoracle` |
|
|
29
29
|
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
30
|
-
| CUDA
|
|
30
|
+
| PyPI CUDA tools and headers | Not needed | Not needed | `tensoracle[producer]` supplies cubin tools; `nvidia-cuda-nvcc` and `nvidia-cuda-runtime` 13.2 supply the native build inputs |
|
|
31
31
|
| TensorRT 11 SDK | Not needed | Not needed | Native plugin build |
|
|
32
32
|
| CMake 3.20 or later and C++17 compiler | Not needed | Not needed | Native plugin build |
|
|
33
33
|
|
|
@@ -242,7 +242,9 @@ Install `tensoracle[producer]` when you need to compile cubins from your own ker
|
|
|
242
242
|
pip install 'tensoracle[producer]'
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
`tensoracle.producer.compile_bundle` uses
|
|
245
|
+
`tensoracle.producer.compile_bundle` uses Triton 3.8.0, `ptxas >=13.2,<14`, and `cuobjdump` from the extra's PyPI wheels to produce cubins for sm86, sm89, and sm120. The extra declares `nvidia-cuda-nvcc`, `nvidia-cuda-cuobjdump`, `nvidia-cuda-crt`, and `nvidia-nvvm` in the 13.2 series. The producer ignores `CUDA_HOME` and accepts explicit tool paths as independent overrides. A missing tool identifies the wheel and searched path and explains how to install the extra or pass a path. Cubin production does not need a GPU or import torch; run it without importing torch first.
|
|
246
|
+
|
|
247
|
+
Build the native plugin with a TensorRT 11 SDK, CMake, a C++17 compiler, and PyPI `nvidia-cuda-nvcc==13.2.*` and `nvidia-cuda-runtime==13.2.*`. Pass their `site-packages/nvidia/cu13` directory as `CUDAToolkit_ROOT`, through CMake or the environment. The helper uses the wheel's `cuda.h` and the NVIDIA driver's `libcuda.so` on Linux (including WSL), or the wheel's `lib/x64/cuda.lib` on Windows. Neither workflow needs an OS-installed CUDA Toolkit. TensorRT headers are supplied separately using [Prepare a TensorRT SDK](tensorrt-sdk.md), which also gives the PyPI CUDA setup commands. Inspect the resulting bundle or wheel with `tensoracle.bundle`. The [cubin plugin example](https://github.com/sync-dev-org/tensoracle/tree/main/examples/cubin_plugin) covers rebuilding from a repository clone, packaging, and runtime use. Normal import, engine building, and engine reuse do not import the producer or Triton, and do not need the producer extra or native build tools.
|
|
246
248
|
|
|
247
249
|
Pass a `tensoracle::cubin::PluginIO` declaration as the fourth argument to `PluginBase(name, plugin_namespace, fields, io)`. The `inputs` vector determines the input count and declares each input's TensorRT `type` and `format` through `TensorSpec`; `output` declares the single output's type and format. `shape_input_index` selects the input whose shape the output copies. This example declares two fp16 / HWC8 inputs and an fp16 / HWC8 output with input 0's shape:
|
|
248
250
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Prepare a TensorRT SDK
|
|
2
2
|
|
|
3
|
-
Use the Linux procedure below to prepare the headers and `libnvinfer` needed to build a native cubin plugin on Linux x86_64, including WSL2. For Windows x86_64, use the [Windows procedure](#windows-x86_64). The Linux SDK root contains 13 headers in `include/`, `lib/libnvinfer.so.11`, and a relative `lib/libnvinfer.so` symlink pointing to `libnvinfer.so.11`.
|
|
3
|
+
Use the Linux procedure below to prepare the headers and `libnvinfer` needed to build a native cubin plugin on Linux x86_64, including WSL2. For Windows x86_64, use the [Windows procedure](#windows-x86_64). The Linux SDK root contains 13 headers in `include/`, `lib/libnvinfer.so.11`, and a relative `lib/libnvinfer.so` symlink pointing to `libnvinfer.so.11`. CMake, a C++17 compiler, and the CUDA headers from PyPI are separate build prerequisites; no OS-installed CUDA Toolkit is required. TensorRT headers are absent from the Python wheels and must be prepared separately. Normal engine reuse does not need this SDK root.
|
|
4
4
|
|
|
5
5
|
The inputs below are fixed for SDK **11.2.1.2**: headers from a release commit of [NVIDIA TensorRT OSS](https://github.com/NVIDIA/TensorRT), and the exact `tensorrt-cu13-libs` wheel from [NVIDIA's package index](https://pypi.nvidia.com/tensorrt-cu13-libs/). The wheel platform is `manylinux_2_28_x86_64`; use that file rather than an aarch64 or Windows wheel.
|
|
6
6
|
|
|
@@ -98,14 +98,23 @@ The SONAME identifies only the major version. Matching `libnvinfer.so.11` does n
|
|
|
98
98
|
|
|
99
99
|
## 5. Pass the verified root to the build and tests
|
|
100
100
|
|
|
101
|
-
Keep `TENSORRT_ROOT` set to the absolute path of the verified `sdk` directory. From the tensoracle repository root,
|
|
101
|
+
Keep `TENSORRT_ROOT` set to the absolute path of the verified `sdk` directory. From the tensoracle repository root, install the producer extra into the development environment and locate its PyPI CUDA root. The lock selects `nvidia-cuda-nvcc` and `nvidia-cuda-runtime` 13.2.86. For a separate build environment, install `nvidia-cuda-nvcc==13.2.*` and `nvidia-cuda-runtime==13.2.*` with that environment's package manager and locate `nvidia/cu13` in the same way.
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
uv sync --project python --extra producer
|
|
105
|
+
export CUDAToolkit_ROOT="$(uv run --project python --extra producer python -c 'from importlib.metadata import distribution; print(distribution("nvidia-cuda-runtime").locate_file("nvidia/cu13"))')"
|
|
106
|
+
cmake -S cpp -B build/cpp -DCMAKE_BUILD_TYPE=Release \
|
|
107
|
+
"-DTENSORRT_ROOT=$TENSORRT_ROOT" "-DCUDAToolkit_ROOT=$CUDAToolkit_ROOT"
|
|
108
|
+
cmake --build build/cpp
|
|
109
|
+
ctest --test-dir build/cpp --output-on-failure
|
|
110
|
+
uv build examples/cubin_plugin --wheel \
|
|
111
|
+
"--config-setting=cmake.define.TENSORRT_ROOT=$TENSORRT_ROOT" \
|
|
112
|
+
"--config-setting=cmake.define.CUDAToolkit_ROOT=$CUDAToolkit_ROOT"
|
|
113
|
+
TENSORACLE_SDK_ROOT="$TENSORRT_ROOT" TENSORACLE_CUDA_ROOT="$CUDAToolkit_ROOT" \
|
|
114
|
+
uv run --project python --extra producer pytest -q python/tests/test_example_plugin.py
|
|
106
115
|
```
|
|
107
116
|
|
|
108
|
-
The
|
|
117
|
+
The native helper reads `cuda.h` from this root and links the installed NVIDIA driver's `libcuda.so`; on WSL it searches `/usr/lib/wsl/lib`. It prints the selected headers and driver library during configuration. `CUDAToolkit_ROOT` can also be passed through the environment. Existing OS Toolkit roots and the default search through `nvcc` on `PATH` and `/usr/local/cuda` remain supported. Tests marked `gpu` require an NVIDIA GPU and driver. The SDK is a build input. The application still selects the TensorRT runtime and verifies its own plugin with that runtime.
|
|
109
118
|
|
|
110
119
|
## Use another TensorRT 11 release
|
|
111
120
|
|
|
@@ -115,7 +124,7 @@ Use the same acquisition and verification steps for another TensorRT 11 release,
|
|
|
115
124
|
|
|
116
125
|
Use NVIDIA's official Windows ZIP to obtain both the headers and the MSVC import library. The TensorRT runtime wheel supplies DLLs, but it does not replace the SDK's `include/` directory and `lib/nvinfer_11.lib`. See NVIDIA's [Windows ZIP installation guide](https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/install-zip.html) and [TensorRT 11 downloads](https://developer.nvidia.com/tensorrt/download/11x).
|
|
117
126
|
|
|
118
|
-
The following inputs are fixed for **11.4.0.106**, Windows amd64, CUDA 13.4. Use Visual Studio 2022 with MSVC, CMake,
|
|
127
|
+
The following inputs are fixed for **11.4.0.106**, Windows amd64, CUDA 13.4. Use Visual Studio 2022 with MSVC, CMake, and Ninja available in an **x64 Native Tools Command Prompt for VS 2022**, then start PowerShell from that prompt. The CUDA build inputs below come from PyPI's 13.2 wheels; an OS-installed CUDA Toolkit is not needed. tensoracle's Python runtime dependencies select the CUDA 13 TensorRT runtime separately. Do not combine Windows import libraries with Linux shared libraries.
|
|
119
128
|
|
|
120
129
|
Choose a new workspace. The command creating it must fail if the directory already exists. Download the fixed ZIP, record its digest, and extract it without installing software system-wide:
|
|
121
130
|
|
|
@@ -180,7 +189,14 @@ From the tensoracle repository root, configure and test the standalone C++ proje
|
|
|
180
189
|
|
|
181
190
|
```powershell
|
|
182
191
|
$env:TENSORACLE_SDK_ROOT = $env:TENSORRT_ROOT
|
|
183
|
-
|
|
192
|
+
uv sync --project python
|
|
193
|
+
if ($LASTEXITCODE) { throw 'Development environment setup failed' }
|
|
194
|
+
uv pip install --python python/.venv/Scripts/python.exe `
|
|
195
|
+
'nvidia-cuda-nvcc==13.2.*' 'nvidia-cuda-runtime==13.2.*'
|
|
196
|
+
if ($LASTEXITCODE) { throw 'PyPI CUDA installation failed' }
|
|
197
|
+
$env:CUDAToolkit_ROOT = (& python/.venv/Scripts/python.exe -c 'from importlib.metadata import distribution; print(distribution("nvidia-cuda-runtime").locate_file("nvidia/cu13"))')
|
|
198
|
+
if ($LASTEXITCODE) { throw 'PyPI CUDA root lookup failed' }
|
|
199
|
+
$env:TENSORACLE_CUDA_ROOT = $env:CUDAToolkit_ROOT
|
|
184
200
|
cmake -S cpp -B build/windows -G Ninja -DCMAKE_BUILD_TYPE=Release `
|
|
185
201
|
"-DTENSORRT_ROOT=$env:TENSORRT_ROOT" "-DCUDAToolkit_ROOT=$env:TENSORACLE_CUDA_ROOT"
|
|
186
202
|
if ($LASTEXITCODE) { throw 'CMake configuration failed' }
|
|
@@ -196,4 +212,4 @@ uv run --project python pytest python/tests/test_example_plugin.py
|
|
|
196
212
|
if ($LASTEXITCODE) { throw 'Example plugin tests failed' }
|
|
197
213
|
```
|
|
198
214
|
|
|
199
|
-
The example build uses `cpp/cmake/TensoracleCubinPlugin.cmake`, which finds `nvinfer_11.lib` in the SDK's `lib/` directory. The built plugin is a DLL. Keep its TensorRT runtime available through the application's installed Python dependencies; the SDK directory is a build input and does not need to be added to the runtime `PATH`. For another TensorRT 11 release, establish new expected digests and check that release's exact header version before building.
|
|
215
|
+
The example build uses `cpp/cmake/TensoracleCubinPlugin.cmake`, which finds `nvinfer_11.lib` in the SDK's `lib/` directory, `cuda.h` in the PyPI root's `include/`, and the CUDA driver import library at `lib/x64/cuda.lib` in that root. The built plugin is a DLL. Keep its TensorRT runtime available through the application's installed Python dependencies; the SDK directory is a build input and does not need to be added to the runtime `PATH`. For another TensorRT 11 release, establish new expected digests and check that release's exact header version before building.
|
|
@@ -6,13 +6,13 @@ The first plugin computes an fp32 32 by 16 dot product and then scales it in a s
|
|
|
6
6
|
|
|
7
7
|
## Rebuild the cubins
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The producer extra supplies Triton 3.8.0 and the PyPI CUDA tools, including `ptxas >=13.2,<14` and `cuobjdump`. No OS-installed CUDA Toolkit is required. From the tensoracle repository root, run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
uv run --project python --extra producer python -c 'from pathlib import Path; from examples.cubin_plugin.kernels import kernel_specs; from tensoracle.producer import compile_bundle; compile_bundle(kernel_specs(), Path("examples/cubin_plugin/bundle"))'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
This installs Triton 3.8.0 with `tensoracle[producer]
|
|
15
|
+
This installs Triton 3.8.0 and the 13.2 series of `nvidia-cuda-nvcc`, `nvidia-cuda-cuobjdump`, `nvidia-cuda-crt`, and `nvidia-nvvm` with `tensoracle[producer]`, then recreates `bundle/` without using a GPU. The tools come from `nvidia/cu13/bin/` in the installed wheels, and `CUDA_HOME` is ignored. Explicit `ptxas` and `cuobjdump` paths passed to `compile_bundle` override the wheel defaults independently. The producer checks the cubin ELF SM, public and hidden argument layout, register count, and zero scratch sizes before writing the manifest. Run the tests below with the producer extra alone so torch is absent; `compile_bundle` rejects an already imported torch.
|
|
16
16
|
|
|
17
17
|
Check that the generated bundle has the expected files and passes inspection without using a GPU:
|
|
18
18
|
|
|
@@ -20,26 +20,31 @@ Check that the generated bundle has the expected files and passes inspection wit
|
|
|
20
20
|
uv run --project python --extra producer pytest -m "not gpu" python/tests/test_producer.py
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Without Triton or the
|
|
23
|
+
Without Triton or the wheel tools, the compilation tests skip with an explanation of what is missing.
|
|
24
24
|
|
|
25
25
|
## Build and inspect the wheel
|
|
26
26
|
|
|
27
27
|
Follow [Prepare a TensorRT SDK](../../docs/tensorrt-sdk.md) to obtain and verify the headers and library, then set `TENSORRT_ROOT` to that TensorRT 11 SDK containing `include/NvInfer.h` and a `lib` directory. The procedure supplies fixed inputs for SDK 11.2.1.2 and explains how to verify other TensorRT 11 releases. The example has been built against SDK 11.0.0.114, 11.1.0.106, 11.2.1.2, 11.3.0.99, and 11.4.0.106 and run on sm86, sm89, and sm120; see the [tested environments](../../README.md#tested-environments). `TENSORACLE_CPP_ROOT` may point to the `cpp` directory inside an installed tensoracle wheel; when building from this repository it defaults to `../../cpp`.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
uv sync --project python --extra producer
|
|
31
|
+
export CUDAToolkit_ROOT="$(uv run --project python --extra producer python -c 'from importlib.metadata import distribution; print(distribution("nvidia-cuda-runtime").locate_file("nvidia/cu13"))')"
|
|
32
|
+
uv build examples/cubin_plugin --wheel \
|
|
33
|
+
"--config-setting=cmake.define.TENSORRT_ROOT=$TENSORRT_ROOT" \
|
|
34
|
+
"--config-setting=cmake.define.CUDAToolkit_ROOT=$CUDAToolkit_ROOT"
|
|
31
35
|
```
|
|
32
36
|
|
|
33
|
-
The example's build backend and CUDA tooling belong to this project, not to tensoracle's runtime dependencies. Before installation, inspect the wheel with `tensoracle.bundle.inspect_wheel(wheel, plugin="example_cubin_plugin/libtensoracle_example_plugin.so")`. For a wheel built on Windows, pass `plugin="example_cubin_plugin/tensoracle_example_plugin.dll"`. This compares the library's embedded digest and cubin bytes with the manifest and cubin files.
|
|
37
|
+
The native build uses the PyPI `nvidia-cuda-nvcc` and `nvidia-cuda-runtime` 13.2 root's `cuda.h` and the NVIDIA driver's `libcuda.so` on Linux, including WSL. Windows builds use the wheel's `lib/x64/cuda.lib`; follow the SDK guide's Windows commands to prepare that environment without the Linux-only Triton producer. Neither build needs an OS-installed CUDA Toolkit. The example's build backend and CUDA tooling belong to this project, not to tensoracle's runtime dependencies. Before installation, inspect the wheel with `tensoracle.bundle.inspect_wheel(wheel, plugin="example_cubin_plugin/libtensoracle_example_plugin.so")`. For a wheel built on Windows, pass `plugin="example_cubin_plugin/tensoracle_example_plugin.dll"`. This compares the library's embedded digest and cubin bytes with the manifest and cubin files.
|
|
34
38
|
|
|
35
39
|
Install the tensoracle wheel and this example wheel into a runtime Python environment with TensorRT 11 and `cuda-python`, but without Triton, torch, or the TensorRT SDK. `open_engine` registers the library before calling `graph` or opening a saved engine. The tests use two separate processes and an `XDG_CACHE_HOME` directory to verify that the second process reuses the saved engine without building a graph.
|
|
36
40
|
|
|
37
41
|
## Test on each GPU generation
|
|
38
42
|
|
|
39
|
-
Run from the tensoracle repository with the SDK and CUDA
|
|
43
|
+
Run from the tensoracle repository with the SDK and PyPI CUDA root paths set. The GPU tests build the example wheel, install it in a temporary runtime environment, and run dynamic shapes, direct builds, saved engine reuse, simultaneous execution in two distinct CUDA contexts, and an fp32 versus TF32 control. Each GPU subprocess has a 50 second limit.
|
|
40
44
|
|
|
41
45
|
```bash
|
|
42
|
-
TENSORACLE_SDK_ROOT="$TENSORRT_ROOT"
|
|
46
|
+
TENSORACLE_SDK_ROOT="$TENSORRT_ROOT" TENSORACLE_CUDA_ROOT="$CUDAToolkit_ROOT" \
|
|
47
|
+
uv run --project python pytest -q python/tests/test_example_plugin.py
|
|
43
48
|
```
|
|
44
49
|
|
|
45
50
|
Record the GPU name, SM, TensorRT runtime version, test result, and wheel digest on sm86, sm89, and sm120 separately. The code and wheel contain all three cubin generations; successful execution on one generation does not establish the other two.
|
|
@@ -31,7 +31,13 @@ issues = "https://github.com/sync-dev-org/tensoracle/issues"
|
|
|
31
31
|
|
|
32
32
|
[project.optional-dependencies]
|
|
33
33
|
convert = ["torch>=2.6"]
|
|
34
|
-
producer = [
|
|
34
|
+
producer = [
|
|
35
|
+
"triton==3.8.0",
|
|
36
|
+
"nvidia-cuda-nvcc==13.2.*",
|
|
37
|
+
"nvidia-cuda-cuobjdump==13.2.*",
|
|
38
|
+
"nvidia-cuda-crt==13.2.*",
|
|
39
|
+
"nvidia-nvvm==13.2.*",
|
|
40
|
+
]
|
|
35
41
|
|
|
36
42
|
[build-system]
|
|
37
43
|
requires = ["hatchling", "hatch-vcs"]
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.4.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 4, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|