tensoracle 1.1.0__tar.gz → 1.2.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.1.0 → tensoracle-1.2.0}/PKG-INFO +4 -6
- {tensoracle-1.1.0 → tensoracle-1.2.0}/README.md +3 -3
- tensoracle-1.2.0/docs/api/producer.md +7 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/index.md +3 -3
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/README.md +4 -4
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/bundle/bundle.cpp +2121 -1776
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/bundle/bundle.json +33 -33
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm120/bias.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm120/dot.specialized.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm120/dot.tf32-control.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm120/dot.unspecialized.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm120/scale.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm86/bias.cubin +0 -0
- {tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm89 → tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm86}/dot.specialized.cubin +0 -0
- {tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm89 → tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm86}/dot.tf32-control.cubin +0 -0
- {tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm89 → tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm86}/dot.unspecialized.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm86/scale.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm89/bias.cubin +0 -0
- {tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm86 → tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm89}/dot.specialized.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm89/dot.tf32-control.cubin +0 -0
- {tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm86 → tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm89}/dot.unspecialized.cubin +0 -0
- tensoracle-1.2.0/examples/cubin_plugin/bundle/cubins/sm89/scale.cubin +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/pyproject.toml +9 -5
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_version.py +2 -2
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/bundle.py +10 -7
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/producer.py +11 -17
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_bundle.py +34 -1
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_producer.py +100 -57
- {tensoracle-1.1.0 → tensoracle-1.2.0}/uv.lock +46 -247
- tensoracle-1.1.0/docs/api/producer.md +0 -7
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm120/bias.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm120/dot.specialized.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm120/dot.tf32-control.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm120/dot.unspecialized.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm86/bias.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm86/dot.tf32-control.cubin +0 -0
- tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm89/bias.cubin +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/.gitignore +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/LICENSE +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/build_backend.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/cpp/CMakeLists.txt +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/cpp/cmake/TensoracleCubinPlugin.cmake +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/cpp/include/tensoracle/cubin_plugin.hpp +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/cpp/src/cubin_plugin.cpp +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/cpp/tests/core.cpp +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/api/bundle.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/api/index.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/cpp-python-repositories.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/optimization.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/precision.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/docs/tensorrt-sdk.md +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/CMakeLists.txt +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/example_cubin_plugin/__init__.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/example_cubin_plugin/weights.safetensors +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/kernels.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/plugin.cpp +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/examples/cubin_plugin/pyproject.toml +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/mkdocs.yml +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/__init__.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_build.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_cache.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_comparison.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_execution.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_memory.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/_plugins.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/src/tensoracle/convert.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/build_memory_runtime.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/cubin_io/check.cpp +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/cubin_io/kernels.cu +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/cubin_io/plugin.cpp +0 -0
- /tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm120/scale.cubin → /tensoracle-1.2.0/tests/cubins/ptxas-12.9.86/sm120.cubin +0 -0
- /tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm86/scale.cubin → /tensoracle-1.2.0/tests/cubins/ptxas-12.9.86/sm86.cubin +0 -0
- /tensoracle-1.1.0/examples/cubin_plugin/bundle/cubins/sm89/scale.cubin → /tensoracle-1.2.0/tests/cubins/ptxas-12.9.86/sm89.cubin +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/example_runtime.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/native/CMakeLists.txt +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/native/export.h +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/native_build.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/plugin_io_runtime.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/precision_runtime.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_build.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_build_memory.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_cache.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_cmake_plugin.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_comparison.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_convert.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_cpp_core.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_cuda_graphs.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_distribution.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_engine_io.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_example_plugin.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_execution.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_gpu_cache.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_plugin_io.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_plugins.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_precision.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_shape_tensor_outputs.py +0 -0
- {tensoracle-1.1.0 → tensoracle-1.2.0}/tests/test_weight_hash.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tensoracle
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Build, save, reuse, and execute TensorRT engines from safetensors weights
|
|
5
5
|
Project-URL: documentation, https://sync-dev-org.github.io/tensoracle/
|
|
6
6
|
Project-URL: repository, https://github.com/sync-dev-org/tensoracle
|
|
@@ -24,8 +24,6 @@ Requires-Dist: tensorrt-cu13<12,>=11.0
|
|
|
24
24
|
Provides-Extra: convert
|
|
25
25
|
Requires-Dist: torch>=2.6; extra == 'convert'
|
|
26
26
|
Provides-Extra: producer
|
|
27
|
-
Requires-Dist: nvidia-cuda-cuobjdump<13.4,>=13.3.73; extra == 'producer'
|
|
28
|
-
Requires-Dist: nvidia-cuda-nvcc-cu12==12.9.86; extra == 'producer'
|
|
29
27
|
Requires-Dist: triton==3.8.0; extra == 'producer'
|
|
30
28
|
Description-Content-Type: text/markdown
|
|
31
29
|
|
|
@@ -53,8 +51,8 @@ Choose the path that matches your work:
|
|
|
53
51
|
| `tensorrt-cu13` 11.x | Open and run engines | Build and open engines | Open plugin engines |
|
|
54
52
|
| NVIDIA GPU and driver | Open and run engines | Build and run engines | Run and test engines; cubin production itself can run without a GPU |
|
|
55
53
|
| 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` |
|
|
56
|
-
| Triton 3.8.0
|
|
57
|
-
| CUDA toolkit | Not needed | Not needed |
|
|
54
|
+
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
55
|
+
| CUDA toolkit | Not needed | Not needed | Cubin production (`ptxas >=13.2,<14` and `cuobjdump`) and native plugin build |
|
|
58
56
|
| TensorRT 11 SDK | Not needed | Not needed | Native plugin build |
|
|
59
57
|
| CMake 3.20 or later and C++17 compiler | Not needed | Not needed | Native plugin build |
|
|
60
58
|
|
|
@@ -346,7 +344,7 @@ python/
|
|
|
346
344
|
|
|
347
345
|
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.
|
|
348
346
|
|
|
349
|
-
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0
|
|
347
|
+
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the host CUDA toolkit. It uses the toolkit directory named by `CUDA_HOME`, or `/usr/local/cuda` when `CUDA_HOME` is unset; explicit `ptxas` and `cuobjdump` paths override these defaults independently. 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.
|
|
350
348
|
|
|
351
349
|
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.
|
|
352
350
|
|
|
@@ -22,8 +22,8 @@ Choose the path that matches your work:
|
|
|
22
22
|
| `tensorrt-cu13` 11.x | Open and run engines | Build and open engines | Open plugin engines |
|
|
23
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 |
|
|
24
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` |
|
|
25
|
-
| Triton 3.8.0
|
|
26
|
-
| CUDA toolkit | Not needed | Not needed |
|
|
25
|
+
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
26
|
+
| CUDA toolkit | Not needed | Not needed | Cubin production (`ptxas >=13.2,<14` and `cuobjdump`) and native plugin build |
|
|
27
27
|
| TensorRT 11 SDK | Not needed | Not needed | Native plugin build |
|
|
28
28
|
| CMake 3.20 or later and C++17 compiler | Not needed | Not needed | Native plugin build |
|
|
29
29
|
|
|
@@ -315,7 +315,7 @@ python/
|
|
|
315
315
|
|
|
316
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.
|
|
317
317
|
|
|
318
|
-
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0
|
|
318
|
+
`tensoracle.producer.compile_bundle` uses the extra's **Triton 3.8.0** with **ptxas >=13.2,<14** and **cuobjdump** from the host CUDA toolkit. It uses the toolkit directory named by `CUDA_HOME`, or `/usr/local/cuda` when `CUDA_HOME` is unset; explicit `ptxas` and `cuobjdump` paths override these defaults independently. 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
319
|
|
|
320
320
|
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
321
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Cubin producer API
|
|
2
|
+
|
|
3
|
+
The following names are available from `tensoracle.producer`. Install `tensoracle[producer]` for Triton 3.8.0 and provide a host CUDA toolkit with `ptxas >=13.2,<14` and `cuobjdump`. `compile_bundle` uses the toolkit directory named by `CUDA_HOME`, or `/usr/local/cuda` when `CUDA_HOME` is unset. Explicit `ptxas` and `cuobjdump` paths override the defaults independently. A missing tool reports the searched path and how to set `CUDA_HOME` or pass an explicit path. Cubin production does not need a GPU. Normal imports, engine building, and engine reuse do not import the producer or Triton.
|
|
4
|
+
|
|
5
|
+
::: tensoracle.producer.KernelSpec
|
|
6
|
+
|
|
7
|
+
::: tensoracle.producer.compile_bundle
|
|
@@ -26,8 +26,8 @@ Follow [Build a C++ and Python repository](cpp-python-repositories.md) for sourc
|
|
|
26
26
|
| `tensorrt-cu13` 11.x | Open and run engines | Build and open engines | Open plugin engines |
|
|
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
|
-
| Triton 3.8.0
|
|
30
|
-
| CUDA toolkit | Not needed | Not needed |
|
|
29
|
+
| Triton 3.8.0 | Not needed | Not needed | Installed with `tensoracle[producer]` for cubin production |
|
|
30
|
+
| CUDA toolkit | Not needed | Not needed | Cubin production (`ptxas >=13.2,<14` and `cuobjdump`) and native plugin build |
|
|
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,7 @@ 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 the extra's Triton 3.8.0
|
|
245
|
+
`tensoracle.producer.compile_bundle` uses the extra's Triton 3.8.0 with `ptxas >=13.2,<14` and `cuobjdump` from the host CUDA toolkit to produce cubins for sm86, sm89, and sm120. It uses the toolkit directory named by `CUDA_HOME`, or `/usr/local/cuda` when `CUDA_HOME` is unset, and accepts explicit paths as independent overrides. Cubin production does not need a GPU or import torch; run it without importing torch first. Build the native plugin with a TensorRT 11 SDK, CUDA toolkit, CMake, and a C++17 compiler. 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
246
|
|
|
247
247
|
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
248
|
|
|
@@ -6,21 +6,21 @@ 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
|
-
From the tensoracle repository root, run:
|
|
9
|
+
Provide a CUDA toolkit with `ptxas >=13.2,<14` and `cuobjdump`. Set `CUDA_HOME` to its directory; when unset, the producer uses `/usr/local/cuda`. 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
|
|
15
|
+
This installs Triton 3.8.0 with `tensoracle[producer]` and recreates `bundle/` with the host toolkit tools without using a GPU. Explicit `ptxas` and `cuobjdump` paths passed to `compile_bundle` override the toolkit 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
|
-
Check that the
|
|
17
|
+
Check that the generated bundle has the expected files and passes inspection without using a GPU:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
uv run --project python --extra producer pytest -m "not gpu" python/tests/test_producer.py
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Without the
|
|
23
|
+
Without Triton or the toolkit tools, the compilation tests skip with an explanation of what is missing.
|
|
24
24
|
|
|
25
25
|
## Build and inspect the wheel
|
|
26
26
|
|