tensoracle 2.3.0__tar.gz → 2.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.
Files changed (180) hide show
  1. {tensoracle-2.3.0 → tensoracle-2.4.0}/PKG-INFO +18 -3
  2. {tensoracle-2.3.0 → tensoracle-2.4.0}/README.md +15 -1
  3. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/CMakeLists.txt +8 -1
  4. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/README.md +3 -2
  5. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/bootstrap.cmake +4 -0
  6. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conanfile.py +0 -11
  7. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/tensoracle.h +1 -1
  8. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/cpp-sdk.md +4 -3
  9. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/index.md +13 -1
  10. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/tensorrt-sdk.md +25 -2
  11. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/README.md +1 -1
  12. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/wheel_consumer/README.md +4 -2
  13. {tensoracle-2.3.0 → tensoracle-2.4.0}/pyproject.toml +2 -1
  14. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/_version.py +2 -2
  15. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_conan.py +43 -0
  16. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_distribution.py +38 -8
  17. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_example_plugin.py +9 -1
  18. tensoracle-2.4.0/tests/test_native_install.py +96 -0
  19. {tensoracle-2.3.0 → tensoracle-2.4.0}/uv.lock +7 -3
  20. {tensoracle-2.3.0 → tensoracle-2.4.0}/.gitignore +0 -0
  21. {tensoracle-2.3.0 → tensoracle-2.4.0}/CMakeLists.txt +0 -0
  22. {tensoracle-2.3.0 → tensoracle-2.4.0}/LICENSE +0 -0
  23. {tensoracle-2.3.0 → tensoracle-2.4.0}/bindings.cpp +0 -0
  24. {tensoracle-2.3.0 → tensoracle-2.4.0}/build_backend.py +0 -0
  25. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/cmake/TensoracleCubinPlugin.cmake +0 -0
  26. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/cmake/TensoracleCuda.cmake +0 -0
  27. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/cmake/TensoracleDependencies.cmake +0 -0
  28. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/cmake/tensoracleConfig.cmake.in +0 -0
  29. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/install.cmake +0 -0
  30. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/prepare-tests.cmake +0 -0
  31. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/profiles/linux-gcc13 +0 -0
  32. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/profiles/linux-gcc14 +0 -0
  33. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/cuda-toolkit/conanfile.py +0 -0
  34. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/cuda-toolkit/redist.json +0 -0
  35. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/tensorrt/LICENSE.NVIDIA +0 -0
  36. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/tensorrt/LICENSE.OSS +0 -0
  37. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/tensorrt/conandata.yml +0 -0
  38. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes/tensorrt/conanfile.py +0 -0
  39. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes.json +0 -0
  40. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan/recipes.py +0 -0
  41. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/conan.lock +0 -0
  42. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/builder.h +0 -0
  43. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/builder.hpp +0 -0
  44. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/cache.h +0 -0
  45. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/cache.hpp +0 -0
  46. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/cubin.h +0 -0
  47. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/cubin.hpp +0 -0
  48. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/cubin_plugin.hpp +0 -0
  49. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/engine.h +0 -0
  50. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/engine.hpp +0 -0
  51. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/plugins.h +0 -0
  52. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/plugins.hpp +0 -0
  53. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/include/tensoracle/tensoracle.hpp +0 -0
  54. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/abi.cpp +0 -0
  55. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/builder.cpp +0 -0
  56. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/builder_internal.hpp +0 -0
  57. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/bundle.cpp +0 -0
  58. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/bundle_internal.hpp +0 -0
  59. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache.cpp +0 -0
  60. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache.hpp +0 -0
  61. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache_management.cpp +0 -0
  62. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache_management_internal.cpp +0 -0
  63. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache_management_internal.hpp +0 -0
  64. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cache_open.cpp +0 -0
  65. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/comparison.cpp +0 -0
  66. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/cubin_plugin.cpp +0 -0
  67. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/engine.cpp +0 -0
  68. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/engine_internal.hpp +0 -0
  69. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/error.cpp +0 -0
  70. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/error.hpp +0 -0
  71. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/native_exports.hpp +0 -0
  72. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/plugins.cpp +0 -0
  73. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/producer.cpp +0 -0
  74. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/safetensors.cpp +0 -0
  75. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/safetensors.hpp +0 -0
  76. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/sha256.hpp +0 -0
  77. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/structure.hpp +0 -0
  78. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/src/tensoracle.map +0 -0
  79. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/CMakeLists.txt +0 -0
  80. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/abi.cpp +0 -0
  81. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/builder.cpp +0 -0
  82. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/builder_fixture.hpp +0 -0
  83. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/builder_probe.cpp +0 -0
  84. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/c_consumer.c +0 -0
  85. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/cache.cpp +0 -0
  86. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/cache_management.cpp +0 -0
  87. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/cache_probe.cpp +0 -0
  88. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/comparison.cpp +0 -0
  89. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/concurrent_builder.hpp +0 -0
  90. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/consumer/CMakeLists.txt +0 -0
  91. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/consumer/main.cpp +0 -0
  92. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/core.cpp +0 -0
  93. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/cubin.cpp +0 -0
  94. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/driver_failures.cpp +0 -0
  95. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/execution.cpp +0 -0
  96. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/installed.cmake +0 -0
  97. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/native_exports.cpp +0 -0
  98. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/native_exports_fixture.cpp +0 -0
  99. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/plugin_fixture.cpp +0 -0
  100. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/plugins.cpp +0 -0
  101. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/precision.cpp +0 -0
  102. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/runtime.cmake +0 -0
  103. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/static_consumer/CMakeLists.txt +0 -0
  104. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/static_consumer/fixture.cpp +0 -0
  105. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/static_consumer/fixture.h +0 -0
  106. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/static_consumer/main.c +0 -0
  107. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/static_consumer/main.cpp +0 -0
  108. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/utilities.cpp +0 -0
  109. {tensoracle-2.3.0 → tensoracle-2.4.0}/cpp/tests/weights.cpp +0 -0
  110. {tensoracle-2.3.0 → tensoracle-2.4.0}/cubin_bindings.cpp +0 -0
  111. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/api/bundle.md +0 -0
  112. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/api/index.md +0 -0
  113. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/api/producer.md +0 -0
  114. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/cpp-python-repositories.md +0 -0
  115. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/migration.md +0 -0
  116. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/optimization.md +0 -0
  117. {tensoracle-2.3.0 → tensoracle-2.4.0}/docs/precision.md +0 -0
  118. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/CMakeLists.txt +0 -0
  119. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bindings.cpp +0 -0
  120. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/bundle.cpp +0 -0
  121. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/bundle.json +0 -0
  122. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm120/bias.cubin +0 -0
  123. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.specialized.cubin +0 -0
  124. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.tf32-control.cubin +0 -0
  125. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm120/dot.unspecialized.cubin +0 -0
  126. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm120/scale.cubin +0 -0
  127. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm86/bias.cubin +0 -0
  128. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.specialized.cubin +0 -0
  129. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.tf32-control.cubin +0 -0
  130. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm86/dot.unspecialized.cubin +0 -0
  131. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm86/scale.cubin +0 -0
  132. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm89/bias.cubin +0 -0
  133. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.specialized.cubin +0 -0
  134. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.tf32-control.cubin +0 -0
  135. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm89/dot.unspecialized.cubin +0 -0
  136. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/bundle/cubins/sm89/scale.cubin +0 -0
  137. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/example_cubin_plugin/__init__.py +0 -0
  138. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/example_cubin_plugin/weights.safetensors +0 -0
  139. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/kernels.cu +0 -0
  140. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/kernels.py +0 -0
  141. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/plugin.cpp +0 -0
  142. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/cubin_plugin/pyproject.toml +0 -0
  143. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/wheel_consumer/CMakeLists.txt +0 -0
  144. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/wheel_consumer/bindings.cpp +0 -0
  145. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/wheel_consumer/pyproject.toml +0 -0
  146. {tensoracle-2.3.0 → tensoracle-2.4.0}/examples/wheel_consumer/src/tensoracle_consumer/__init__.py +0 -0
  147. {tensoracle-2.3.0 → tensoracle-2.4.0}/mkdocs.yml +0 -0
  148. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/__init__.py +0 -0
  149. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/_cli.py +0 -0
  150. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/_comparison.py +0 -0
  151. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/bundle.py +0 -0
  152. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/convert.py +0 -0
  153. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/producer.py +0 -0
  154. {tensoracle-2.3.0 → tensoracle-2.4.0}/src/tensoracle/py.typed +0 -0
  155. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/cubin_io/check.cpp +0 -0
  156. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/cubins/ptxas-12.9.86/sm120.cubin +0 -0
  157. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/cubins/ptxas-12.9.86/sm86.cubin +0 -0
  158. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/cubins/ptxas-12.9.86/sm89.cubin +0 -0
  159. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/native/CMakeLists.txt +0 -0
  160. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/native/cache/CMakeLists.txt +0 -0
  161. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/native/cache/writer.cpp +0 -0
  162. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/native/export.h +0 -0
  163. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/native_build.py +0 -0
  164. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_build_distributions.py +0 -0
  165. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_bundle.py +0 -0
  166. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_cache_cli.py +0 -0
  167. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_cmake_cuda.py +0 -0
  168. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_cmake_plugin.py +0 -0
  169. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_comparison.py +0 -0
  170. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_comparison_binding.py +0 -0
  171. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_convert.py +0 -0
  172. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_cpp_core.py +0 -0
  173. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_cpp_test_runtime.py +0 -0
  174. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_native.py +0 -0
  175. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_plugin_io.py +0 -0
  176. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_producer.py +0 -0
  177. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_public_api.py +0 -0
  178. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_recipe_acquisition.py +0 -0
  179. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_static_sdk.py +0 -0
  180. {tensoracle-2.3.0 → tensoracle-2.4.0}/tests/test_tensorrt_recipe.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensoracle
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: Build, save, reuse, and execute TensorRT engines from safetensors weights
5
5
  Author-Email: minamik <mia@sync.dev>
6
6
  License-Expression: MIT
@@ -19,9 +19,10 @@ Project-URL: issues, https://github.com/sync-dev-org/tensoracle/issues
19
19
  Requires-Python: <3.14,>=3.12
20
20
  Requires-Dist: numpy>=2.0
21
21
  Requires-Dist: safetensors>=0.4
22
- Requires-Dist: tensorrt-cu13<12,>=11.2
23
22
  Provides-Extra: convert
24
23
  Requires-Dist: torch>=2.6; extra == "convert"
24
+ Provides-Extra: tensorrt
25
+ Requires-Dist: tensorrt-cu13<12,>=11.2; extra == "tensorrt"
25
26
  Provides-Extra: producer
26
27
  Requires-Dist: nvidia-cuda-nvrtc==13.2.*; extra == "producer"
27
28
  Requires-Dist: nvidia-cuda-nvcc==13.2.*; extra == "producer"
@@ -52,7 +53,21 @@ Read the [v2 user guide](https://sync-dev-org.github.io/tensoracle/) and [Migrat
52
53
 
53
54
  v2 supplies a Linux x86_64 `manylinux_2_28`, `cp312-abi3` wheel, including WSL2. The package currently declares Python 3.12 and 3.13 support. Target GPUs are sm86, sm89, and sm120 with TensorRT 11.2 or later (below 12); fp8 requires sm89 or sm120. Windows x86_64 users must keep using tensoracle 1.x until a later v2 minor release adds a Windows wheel.
54
55
 
55
- The wheel contains the C++ public headers, `libtensoracle`, CMake package configuration, and cubin plugin helper sources. TensorRT is resolved through a wheel dependency; the NVIDIA driver is not bundled. Public C++ interfaces and saved engine files remain compatible within a major version.
56
+ The wheel contains the C++ public headers, `libtensoracle`, CMake package configuration, and cubin plugin helper sources. TensorRT and the NVIDIA driver are not bundled. Public C++ interfaces and saved engine files remain compatible within a major version.
57
+
58
+ ## Install
59
+
60
+ On Linux or WSL2, configure NVIDIA's CUDA apt repository for your distribution using the [TensorRT Debian installation guide](https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/install-debian.html), then install the TensorRT runtime and tensoracle:
61
+
62
+ ```bash
63
+ sudo apt-get update
64
+ sudo apt-get install libnvinfer11
65
+ pip install tensoracle
66
+ ```
67
+
68
+ Use TensorRT 11.2 or later, below 12, including its builder resources. The wheel is built against TensorRT SDK 11.2.1.2. A full CUDA Toolkit and TensorRT's Python bindings are not required for execution. The host must supply a compatible NVIDIA driver.
69
+
70
+ If you prefer pip to supply TensorRT, install `pip install 'tensoracle[tensorrt]'`. The extra declares `tensorrt-cu13>=11.2,<12`. The wheel looks for that extra's `tensorrt_libs` directory first, then uses the host loader's normal search for `libnvinfer.so.11`. Applications that use the host's apt installation depend on `tensoracle` without the extra. See [runtime installation](https://sync-dev-org.github.io/tensoracle/tensorrt-sdk/#install-the-runtime) for verification.
56
71
 
57
72
  ## Build and reopen an engine in C++
58
73
 
@@ -20,7 +20,21 @@ Read the [v2 user guide](https://sync-dev-org.github.io/tensoracle/) and [Migrat
20
20
 
21
21
  v2 supplies a Linux x86_64 `manylinux_2_28`, `cp312-abi3` wheel, including WSL2. The package currently declares Python 3.12 and 3.13 support. Target GPUs are sm86, sm89, and sm120 with TensorRT 11.2 or later (below 12); fp8 requires sm89 or sm120. Windows x86_64 users must keep using tensoracle 1.x until a later v2 minor release adds a Windows wheel.
22
22
 
23
- The wheel contains the C++ public headers, `libtensoracle`, CMake package configuration, and cubin plugin helper sources. TensorRT is resolved through a wheel dependency; the NVIDIA driver is not bundled. Public C++ interfaces and saved engine files remain compatible within a major version.
23
+ The wheel contains the C++ public headers, `libtensoracle`, CMake package configuration, and cubin plugin helper sources. TensorRT and the NVIDIA driver are not bundled. Public C++ interfaces and saved engine files remain compatible within a major version.
24
+
25
+ ## Install
26
+
27
+ On Linux or WSL2, configure NVIDIA's CUDA apt repository for your distribution using the [TensorRT Debian installation guide](https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/install-debian.html), then install the TensorRT runtime and tensoracle:
28
+
29
+ ```bash
30
+ sudo apt-get update
31
+ sudo apt-get install libnvinfer11
32
+ pip install tensoracle
33
+ ```
34
+
35
+ Use TensorRT 11.2 or later, below 12, including its builder resources. The wheel is built against TensorRT SDK 11.2.1.2. A full CUDA Toolkit and TensorRT's Python bindings are not required for execution. The host must supply a compatible NVIDIA driver.
36
+
37
+ If you prefer pip to supply TensorRT, install `pip install 'tensoracle[tensorrt]'`. The extra declares `tensorrt-cu13>=11.2,<12`. The wheel looks for that extra's `tensorrt_libs` directory first, then uses the host loader's normal search for `libnvinfer.so.11`. Applications that use the host's apt installation depend on `tensoracle` without the extra. See [runtime installation](https://sync-dev-org.github.io/tensoracle/tensorrt-sdk/#install-the-runtime) for verification.
24
38
 
25
39
  ## Build and reopen an engine in C++
26
40
 
@@ -107,7 +107,14 @@ install(TARGETS tensoracle EXPORT tensoracleTargets
107
107
  RUNTIME DESTINATION "${_tensoracle_root}${CMAKE_INSTALL_BINDIR}"
108
108
  ARCHIVE DESTINATION "${TENSORACLE_LIBRARY_DIR}")
109
109
  install(DIRECTORY include/ DESTINATION "${TENSORACLE_INCLUDE_DIR}")
110
- include("${CMAKE_BINARY_DIR}/conan/tensoracle_licenses.cmake")
110
+ # Resolve notices from the same packages as the headers, including when the
111
+ # caller supplies CMakeDeps instead of running this project's bootstrap.
112
+ find_file(TENSORACLE_NLOHMANN_JSON_LICENSE LICENSE.MIT
113
+ PATHS ${nlohmann_json_INCLUDE_DIRS} PATH_SUFFIXES ../licenses
114
+ NO_DEFAULT_PATH REQUIRED NO_CACHE)
115
+ find_file(TENSORACLE_MINIZ_LICENSE LICENSE
116
+ PATHS ${miniz_INCLUDE_DIRS} PATH_SUFFIXES ../licenses
117
+ NO_DEFAULT_PATH REQUIRED NO_CACHE)
111
118
  install(FILES "${TENSORACLE_NLOHMANN_JSON_LICENSE}"
112
119
  DESTINATION "${_tensoracle_root}licenses/nlohmann-json")
113
120
  install(FILES "${TENSORACLE_MINIZ_LICENSE}"
@@ -108,6 +108,7 @@ consumers can use the prebuilt SDK archive without Conan or its targets.
108
108
  nanobind stays in Python's build requirements. C++ build inputs come from Conan;
109
109
  the CUDA compiler and tools used at runtime by the cubin producer stay in PyPI
110
110
  wheels. The release profile uses the CUDA toolkit in the manylinux image through
111
- the same recipe's `system` mode; development uses verified NVIDIA redist archives. Installed Python wheels resolve
112
- TensorRT through their existing runtime wheel dependency. Native applications
111
+ the same recipe's `system` mode; development uses verified NVIDIA redist archives. Installed Python wheels without the
112
+ `tensorrt` extra use the host's TensorRT runtime (installed with apt on Linux);
113
+ `tensoracle[tensorrt]` selects the optional TensorRT wheel. Native applications
113
114
  install TensorRT and its builder resources on their execution host.
@@ -1,5 +1,9 @@
1
1
  # Every build entry point includes this before its first project().
2
2
  include_guard(GLOBAL)
3
+ if(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_TOOLCHAIN_FILE STREQUAL "${CMAKE_BINARY_DIR}/conan/conan_toolchain.cmake")
4
+ # The caller already resolved the dependency graph, for example in conan create.
5
+ return()
6
+ endif()
3
7
  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
4
8
  set(CMAKE_BUILD_TYPE Release CACHE STRING "Build configuration" FORCE)
5
9
  endif()
@@ -1,11 +1,9 @@
1
1
  """Resolve the same native dependencies for standalone, test, and wheel builds."""
2
2
 
3
- import os
4
3
  from typing import ClassVar
5
4
 
6
5
  from conan import ConanFile
7
6
  from conan.tools.cmake import CMakeDeps, CMakeToolchain
8
- from conan.tools.files import save
9
7
 
10
8
 
11
9
  class TensoracleDependencies(ConanFile):
@@ -30,12 +28,3 @@ class TensoracleDependencies(ConanFile):
30
28
  "cuda-toolkit"
31
29
  ].conf_info.get("user.cuda:root")
32
30
  toolchain.generate()
33
- licenses = []
34
- for name, filename in (("nlohmann_json", "LICENSE.MIT"), ("miniz", "LICENSE")):
35
- path = os.path.join(
36
- self.dependencies[name].package_folder, "licenses", filename
37
- )
38
- licenses.append(
39
- f'set(TENSORACLE_{name.upper()}_LICENSE "{path.replace(chr(92), "/")}")'
40
- )
41
- save(self, "tensoracle_licenses.cmake", "\n".join(licenses) + "\n")
@@ -5,7 +5,7 @@
5
5
  #include <stdint.h>
6
6
 
7
7
  #define TENSORACLE_VERSION_MAJOR 2
8
- #define TENSORACLE_VERSION_MINOR 3
8
+ #define TENSORACLE_VERSION_MINOR 4
9
9
  #define TENSORACLE_VERSION_PATCH 0
10
10
 
11
11
  #if defined(TENSORACLE_STATIC_LIBRARY)
@@ -64,7 +64,7 @@ the link stub is not part of the application runtime.
64
64
  ## Embed tensoracle from source
65
65
 
66
66
  Source builds select a shared library by default (`BUILD_SHARED_LIBS=ON`). After
67
- [preparing the build dependencies](../cpp/README.md), select a static library
67
+ [preparing the build dependencies](https://github.com/sync-dev-org/tensoracle/blob/main/cpp/README.md), select a static library
68
68
  with `BUILD_SHARED_LIBS=OFF`:
69
69
 
70
70
  ```bash
@@ -144,8 +144,9 @@ TensorRT-specific search path. The host loader finds `libnvinfer.so.11` through
144
144
  its normal configuration. If TensorRT is installed outside the system loader's
145
145
  configured locations, configure that loader or set `LD_LIBRARY_PATH` to the
146
146
  runtime directory. Do not copy TensorRT or driver libraries into tensoracle's
147
- SDK or the application prefix. The Python wheel retains its existing SDK and
148
- its relative lookup of the separate TensorRT wheel.
147
+ SDK or the application prefix. The Python wheel uses the host runtime too;
148
+ it also checks the sibling TensorRT wheel when the optional
149
+ `tensoracle[tensorrt]` extra is installed. See [runtime installation](tensorrt-sdk.md#install-the-runtime).
149
150
 
150
151
  ## Package an application that embeds tensoracle
151
152
 
@@ -23,7 +23,19 @@ If your model package uses tensoracle 1.x, start with [Migrate from 1.x](migrati
23
23
 
24
24
  v2 supplies a Linux x86_64 `manylinux_2_28` wheel, including WSL2, with the `cp312-abi3` tag. The package currently declares Python 3.12 and 3.13 support. TensorRT 11.2 or later (below 12) and GPU generations sm86, sm89, and sm120 are the targets; fp8 requires sm89 or sm120. Windows x86_64 users must use tensoracle 1.x until a later v2 minor release supplies a Windows wheel. A Linux wheel runs under WSL2, not directly in Windows Python.
25
25
 
26
- The wheel includes the shared C++ library, public headers, CMake package configuration, and source-based cubin plugin helpers. It resolves TensorRT through its wheel dependency rather than bundling TensorRT or the NVIDIA driver. The C ABI uses opaque handles and structures with `struct_size`; the C++ headers add exceptions and automatic resource release. Public C++ interfaces and saved engine files remain compatible within the same major version.
26
+ The wheel includes the shared C++ library, public headers, CMake package configuration, and source-based cubin plugin helpers. TensorRT and the NVIDIA driver are not bundled. The C ABI uses opaque handles and structures with `struct_size`; the C++ headers add exceptions and automatic resource release. Public C++ interfaces and saved engine files remain compatible within the same major version.
27
+
28
+ ## Install
29
+
30
+ Configure NVIDIA's CUDA apt repository for your Linux or WSL2 distribution as described in the [runtime installation guide](tensorrt-sdk.md#install-the-runtime), then install:
31
+
32
+ ```bash
33
+ sudo apt-get update
34
+ sudo apt-get install libnvinfer11
35
+ pip install tensoracle
36
+ ```
37
+
38
+ The host runtime must be TensorRT 11.2 or later, below 12, with builder resources; the wheel is built against SDK 11.2.1.2. A compatible NVIDIA driver is required, but neither the CUDA Toolkit nor TensorRT's Python bindings are needed for execution. TensorRT's pip wheel is optional: use `pip install 'tensoracle[tensorrt]'` to select it. Without that extra, tensoracle uses the host loader's normal TensorRT search. Model packages that use apt's runtime declare `tensoracle` without the extra.
27
39
 
28
40
  ### Connect a C++ model package
29
41
 
@@ -37,7 +37,30 @@ uv sync
37
37
  TENSORACLE_CONAN_OFFLINE=ON uv run pytest
38
38
  ```
39
39
 
40
- Isolated wheel builds install their Python build requirements and use the same Conan recipe and lock. TensorRT is not a Python build requirement. During stub generation, the build imports the extension with the exact Conan SDK library and records the loaded library's path and SHA256. The installed wheel requires `tensorrt-cu13>=11.2,<12` and keeps its relative TensorRT RUNPATH; it contains no TensorRT library.
40
+ The default development group selects `tensoracle[tensorrt]`, so `uv sync` and `uv run pytest` keep the TensorRT runtime wheel available for tests. Use `uv sync --all-extras` when also testing checkpoint conversion and cubin production.
41
+
42
+ Isolated wheel builds install their Python build requirements and use the same Conan recipe and lock. TensorRT is not a Python build requirement. During stub generation, the build imports the extension with the exact Conan SDK library and records the loaded library's path and SHA256. The installed wheel contains no TensorRT library and requires its pip runtime only when the `tensorrt` extra is selected.
43
+
44
+ ## Install the runtime
45
+
46
+ Linux and WSL2 applications use a TensorRT runtime installed by apt on their execution host. Follow [NVIDIA's Debian installation instructions](https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/install-debian.html) to configure the CUDA network repository for your distribution, then run:
47
+
48
+ ```bash
49
+ sudo apt-get update
50
+ sudo apt-get install libnvinfer11
51
+ pip install tensoracle
52
+ python -c 'from tensoracle import _native; print(_native.tensorrt_version())'
53
+ ```
54
+
55
+ Use TensorRT 11.2 or later, below 12, including the builder resources needed for engine construction. The wheel is built with TensorRT SDK 11.2.1.2. `apt` resolves the runtime's CUDA library dependencies; a full CUDA Toolkit and TensorRT's Python bindings are not required to execute tensoracle. The host must provide a compatible NVIDIA driver.
56
+
57
+ To obtain TensorRT through pip instead, select the optional runtime:
58
+
59
+ ```bash
60
+ pip install 'tensoracle[tensorrt]'
61
+ ```
62
+
63
+ That extra requires `tensorrt-cu13>=11.2,<12`. The wheel's relative RUNPATH checks the sibling `tensorrt_libs` directory when present. Without it, the host loader finds apt's `libnvinfer.so.11` through its normal configuration; no `LD_LIBRARY_PATH` is needed for a standard apt installation. Packages that use the host runtime declare `tensoracle` without an extra. Neither the tensoracle wheel nor a model wheel should copy TensorRT or the NVIDIA driver libraries.
41
64
 
42
65
  ## Use the recipe in a C++ consumer
43
66
 
@@ -118,7 +141,7 @@ The preprocessor prints `11`, `2`, `1`, and `2` on separate lines; the library's
118
141
 
119
142
  ## Runtime and other releases
120
143
 
121
- A Conan SDK package supplies build inputs. Native applications install TensorRT 11.2 or later (below 12), including the builder resources needed for engine construction, on their execution host using NVIDIA's instructions. Python applications obtain the runtime through tensoracle's wheel dependency. Validate engine construction, separate-process reuse, inference, and numerical output on an NVIDIA GPU and driver. Cubin generation and bundle inspection can run without a GPU.
144
+ A Conan SDK package supplies build inputs. Native and Python applications install TensorRT 11.2 or later (below 12), including the builder resources needed for engine construction, on their execution host using apt as described above. Python applications can instead select `tensoracle[tensorrt]`. Validate engine construction, separate-process reuse, inference, and numerical output on an NVIDIA GPU and driver. Cubin generation and bundle inspection can run without a GPU.
122
145
 
123
146
  This recipe fixes SDK 11.2.1.2. Releases before 11.2 are outside tensoracle's supported range and cannot be used with v2. Another SDK release in the supported range requires its own reviewed header commit, wheel filename and platform, all digests, and exact four-part header version. An explicit external SDK passed to the public plugin helper remains the caller's responsibility to verify and test.
124
147
 
@@ -37,7 +37,7 @@ For an unpublished v2 build, create `/tmp/tensoracle-build-constraints.txt` with
37
37
  tensoracle @ file:///tmp/tensoracle-wheels/<tensoracle-wheel-filename>.whl
38
38
  ```
39
39
 
40
- Build and install the example and tensoracle into a new environment:
40
+ Install the [host's TensorRT runtime](https://sync-dev-org.github.io/tensoracle/tensorrt-sdk/#install-the-runtime) with apt, then build and install the example and tensoracle into a new environment:
41
41
 
42
42
  ```bash
43
43
  uv build examples/cubin_plugin --wheel --out-dir /tmp/example-wheels \
@@ -29,7 +29,7 @@ absolute file URI of the wheel just built:
29
29
  tensoracle @ file:///tmp/tensoracle-wheels/<tensoracle-wheel-filename>.whl
30
30
  ```
31
31
 
32
- Then build and install the two wheels into a new environment:
32
+ Install the [host's TensorRT runtime](https://sync-dev-org.github.io/tensoracle/tensorrt-sdk/#install-the-runtime) with apt, then build and install the two wheels into a new environment:
33
33
 
34
34
  ```bash
35
35
  uv build examples/wheel_consumer --wheel --out-dir /tmp/consumer-wheels \
@@ -68,5 +68,7 @@ build paths and driver link directories do not enter that RUNPATH.
68
68
 
69
69
  The consumer wheel contains no copy of `libtensoracle`, TensorRT, or the CUDA
70
70
  driver. The tensoracle wheel supplies `libtensoracle.so.2`, which locates
71
- TensorRT through its own relative RUNPATH and declared wheel dependency.
71
+ TensorRT through the host loader's normal search. Installing
72
+ `tensoracle[tensorrt]` instead selects the optional pip runtime, which tensoracle
73
+ finds through its relative RUNPATH.
72
74
  Neither importing nor running this example needs `LD_LIBRARY_PATH`.
@@ -20,7 +20,6 @@ requires-python = ">=3.12,<3.14"
20
20
  dependencies = [
21
21
  "numpy>=2.0",
22
22
  "safetensors>=0.4",
23
- "tensorrt-cu13>=11.2,<12",
24
23
  ]
25
24
 
26
25
  [project.scripts]
@@ -33,6 +32,7 @@ issues = "https://github.com/sync-dev-org/tensoracle/issues"
33
32
 
34
33
  [project.optional-dependencies]
35
34
  convert = ["torch>=2.6"]
35
+ tensorrt = ["tensorrt-cu13>=11.2,<12"]
36
36
  producer = [
37
37
  "nvidia-cuda-nvrtc==13.2.*",
38
38
  "nvidia-cuda-nvcc==13.2.*",
@@ -86,6 +86,7 @@ docs = [
86
86
  ]
87
87
  dev = [
88
88
  { include-group = "docs" },
89
+ "tensoracle[tensorrt]",
89
90
  "cuda-python>=13.0",
90
91
  "cupy-cuda13x>=14.2.0",
91
92
  "pytest>=8.0",
@@ -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 = '2.3.0'
22
- __version_tuple__ = version_tuple = (2, 3, 0)
21
+ __version__ = version = '2.4.0'
22
+ __version_tuple__ = version_tuple = (2, 4, 0)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -12,6 +12,49 @@ import pytest
12
12
  from native_build import PROJECT, ROOT
13
13
 
14
14
 
15
+ @pytest.mark.req("SP-TENSORACLE-063")
16
+ def test_caller_toolchain_configures_and_reconfigures_without_conan(tmp_path):
17
+ """A caller's toolchain remains usable without installing another dependency graph."""
18
+ source = tmp_path / "source"
19
+ source.mkdir()
20
+ (source / "CMakeLists.txt").write_text(
21
+ "cmake_minimum_required(VERSION 3.26)\n"
22
+ f'include("{ROOT / "cpp/conan/bootstrap.cmake"}")\n'
23
+ "project(caller_toolchain LANGUAGES NONE)\n"
24
+ 'if(NOT CALLER_TOOLCHAIN_LOADED STREQUAL "yes")\n'
25
+ ' message(FATAL_ERROR "The caller toolchain was replaced")\n'
26
+ "endif()\n"
27
+ )
28
+ toolchain = tmp_path / "caller.cmake"
29
+ toolchain.write_text('set(CALLER_TOOLCHAIN_LOADED "yes")\n')
30
+ empty_path = tmp_path / "empty-bin"
31
+ empty_path.mkdir()
32
+ environment = {**os.environ, "PATH": str(empty_path)}
33
+ assert shutil.which("conan", path=environment["PATH"]) is None
34
+ build = tmp_path / "build"
35
+ for _ in range(2):
36
+ result = subprocess.run(
37
+ [
38
+ shutil.which("cmake"),
39
+ "-S",
40
+ str(source),
41
+ "-B",
42
+ str(build),
43
+ "-G",
44
+ "Ninja",
45
+ f"-DCMAKE_MAKE_PROGRAM={shutil.which('ninja')}",
46
+ f"-DCMAKE_TOOLCHAIN_FILE={toolchain}",
47
+ ],
48
+ env=environment,
49
+ capture_output=True,
50
+ text=True,
51
+ check=False,
52
+ timeout=30,
53
+ )
54
+ assert result.returncode == 0, result.stdout + result.stderr
55
+ assert not (build / "conan").exists()
56
+
57
+
15
58
  def configure(tmp_path, *options, environment=None, cuda=False):
16
59
  source = tmp_path / "source"
17
60
  source.mkdir()
@@ -40,7 +40,7 @@ def test_runtime_dependency_accepts_tensorrt_11_2_through_11_x():
40
40
  config = tomllib.loads((PROJECT / "pyproject.toml").read_text())
41
41
  dependency = next(
42
42
  Requirement(value)
43
- for value in config["project"]["dependencies"]
43
+ for value in config["project"]["optional-dependencies"]["tensorrt"]
44
44
  if Requirement(value).name == "tensorrt-cu13"
45
45
  )
46
46
  assert "11.1" not in dependency.specifier
@@ -301,7 +301,7 @@ def test_wheel_contains_only_the_package_and_distribution_metadata(distributions
301
301
  @pytest.mark.req("SP-TENSORACLE-022")
302
302
  @pytest.mark.req("SP-TENSORACLE-057")
303
303
  def test_wheel_delivers_the_stable_abi_and_cpp_sdk(distributions):
304
- """The cp312-abi3 platform wheel supplies its SDK and depends on TensorRT's wheel."""
304
+ """The cp312-abi3 platform wheel supplies its SDK without bundling TensorRT."""
305
305
  assert re.search(
306
306
  r"-cp312-abi3-(?:linux|manylinux[^-]*)_x86_64\.whl$", distributions["wheel"].name
307
307
  )
@@ -333,6 +333,28 @@ def test_wheel_delivers_the_stable_abi_and_cpp_sdk(distributions):
333
333
  )
334
334
 
335
335
 
336
+ @pytest.mark.req("SP-TENSORACLE-057")
337
+ @pytest.mark.req("SP-TENSORACLE-072")
338
+ def test_wheel_makes_tensorrt_an_optional_runtime(distributions):
339
+ """TensorRT's wheel is installed only when the TensorRT extra is selected."""
340
+ with zipfile.ZipFile(distributions["wheel"]) as archive:
341
+ name = next(name for name in archive.namelist() if name.endswith(".dist-info/METADATA"))
342
+ metadata = email.message_from_bytes(archive.read(name))
343
+ dependencies = [
344
+ Requirement(value)
345
+ for value in metadata.get_all("Requires-Dist")
346
+ if Requirement(value).name == "tensorrt-cu13"
347
+ ]
348
+ assert len(dependencies) == 1
349
+ dependency = dependencies[0]
350
+ assert dependency.marker is not None
351
+ assert not dependency.marker.evaluate({"extra": ""})
352
+ assert dependency.marker.evaluate({"extra": "tensorrt"})
353
+ assert not dependency.marker.evaluate({"extra": "convert"})
354
+ assert not dependency.marker.evaluate({"extra": "producer"})
355
+ assert "tensorrt" in metadata.get_all("Provides-Extra")
356
+
357
+
336
358
  @pytest.mark.req("SP-TENSORACLE-022")
337
359
  @pytest.mark.req("SP-TENSORACLE-056")
338
360
  @pytest.mark.req("SP-TENSORACLE-057")
@@ -342,7 +364,7 @@ def test_installed_wheel_serves_python_and_cpp_without_the_source_tree(distribut
342
364
  subprocess.run(["uv", "venv", "--python", sys.executable, str(runtime)], check=True)
343
365
  python = runtime / "bin/python"
344
366
  subprocess.run(
345
- ["uv", "pip", "install", "--python", str(python), str(distributions["wheel"])],
367
+ ["uv", "pip", "install", "--python", str(python), f"{distributions['wheel']}[tensorrt]"],
346
368
  check=True,
347
369
  timeout=120,
348
370
  )
@@ -394,7 +416,7 @@ def test_installed_wheel_serves_python_and_cpp_without_the_source_tree(distribut
394
416
 
395
417
  @pytest.fixture(scope="module")
396
418
  def extracted_sdk(distributions, tmp_path_factory):
397
- """Use the installed package files without the wheel's TensorRT dependency nearby."""
419
+ """Use the installed package files without the optional TensorRT wheel nearby."""
398
420
  prefix = tmp_path_factory.mktemp("native-sdk")
399
421
  with zipfile.ZipFile(distributions["wheel"]) as archive:
400
422
  for name in archive.namelist():
@@ -537,7 +559,7 @@ def test_wheel_types_the_native_module_with_a_matching_stub(distributions, tmp_p
537
559
  subprocess.run(["uv", "venv", "--python", sys.executable, str(runtime)], check=True)
538
560
  python = runtime / "bin/python"
539
561
  subprocess.run(
540
- ["uv", "pip", "install", "--python", str(python), str(distributions["wheel"])],
562
+ ["uv", "pip", "install", "--python", str(python), f"{distributions['wheel']}[tensorrt]"],
541
563
  check=True,
542
564
  timeout=120,
543
565
  )
@@ -624,7 +646,15 @@ def consumer_wheel(distributions, tmp_path_factory):
624
646
  ):
625
647
  environment.pop(name, None)
626
648
  subprocess.run(
627
- ["uv", "pip", "install", "--python", str(python), str(distributions["wheel"]), str(wheel)],
649
+ [
650
+ "uv",
651
+ "pip",
652
+ "install",
653
+ "--python",
654
+ str(python),
655
+ f"{distributions['wheel']}[tensorrt]",
656
+ str(wheel),
657
+ ],
628
658
  cwd=work,
629
659
  env=environment,
630
660
  check=True,
@@ -751,7 +781,7 @@ print(json.dumps(result))
751
781
  def test_wheel_installs_the_cache_console_script_without_extra_dependencies(
752
782
  distributions, tmp_path
753
783
  ):
754
- """The wheel supplies a runnable cache command and declares the supported TensorRT runtime."""
784
+ """The wheel supplies a runnable cache command without installing TensorRT."""
755
785
  with zipfile.ZipFile(distributions["wheel"]) as archive:
756
786
  name = next(
757
787
  name for name in archive.namelist() if name.endswith(".dist-info/entry_points.txt")
@@ -767,7 +797,7 @@ def test_wheel_installs_the_cache_console_script_without_extra_dependencies(
767
797
  str(Requirement(value))
768
798
  for value in metadata.get_all("Requires-Dist")
769
799
  if not Requirement(value).marker
770
- } == {"numpy>=2.0", "safetensors>=0.4", "tensorrt-cu13<12,>=11.2"}
800
+ } == {"numpy>=2.0", "safetensors>=0.4"}
771
801
  runtime = tmp_path / "runtime"
772
802
  subprocess.run(["uv", "venv", "--python", sys.executable, str(runtime)], check=True)
773
803
  executable = runtime / ("Scripts/python.exe" if sys.platform == "win32" else "bin/python")
@@ -71,7 +71,15 @@ def installed_example(tmp_path_factory):
71
71
  )
72
72
  example_wheel = next(example_dist.glob("*.whl"))
73
73
  installed = subprocess.run(
74
- ["uv", "pip", "install", "--python", str(python), str(main_wheel), str(example_wheel)],
74
+ [
75
+ "uv",
76
+ "pip",
77
+ "install",
78
+ "--python",
79
+ str(python),
80
+ f"{main_wheel}[tensorrt]",
81
+ str(example_wheel),
82
+ ],
75
83
  check=False,
76
84
  capture_output=True,
77
85
  text=True,
@@ -0,0 +1,96 @@
1
+ """Caller-resolved Conan dependencies support shared and static native installs."""
2
+
3
+ import json
4
+ import os
5
+ import subprocess
6
+ from pathlib import Path
7
+
8
+ import pytest
9
+
10
+ from native_build import ROOT
11
+
12
+
13
+ def run(*command):
14
+ result = subprocess.run(command, capture_output=True, text=True, check=False, timeout=180)
15
+ assert result.returncode == 0, result.stdout + result.stderr
16
+ return result.stdout
17
+
18
+
19
+ @pytest.fixture(scope="module")
20
+ def caller_dependencies(tmp_path_factory):
21
+ caller = tmp_path_factory.mktemp("caller-dependencies")
22
+ profile = Path(os.environ.get("TENSORACLE_CONAN_PROFILE", "linux-gcc13"))
23
+ if not profile.is_absolute():
24
+ profile = ROOT / "cpp/conan/profiles" / profile
25
+ graph = json.loads(
26
+ run(
27
+ "conan",
28
+ "install",
29
+ str(ROOT / "cpp"),
30
+ "--lockfile",
31
+ str(ROOT / "cpp/conan.lock"),
32
+ "--profile:host",
33
+ str(profile),
34
+ "--profile:build",
35
+ str(profile),
36
+ "--output-folder",
37
+ str(caller),
38
+ "--no-remote",
39
+ "--build=never",
40
+ "--format=json",
41
+ )
42
+ )
43
+ # A consuming recipe generates a standard Conan toolchain and CMakeDeps;
44
+ # it need not reproduce a custom license manifest for tensoracle.
45
+ (caller / "tensoracle_licenses.cmake").unlink(missing_ok=True)
46
+ expected_licenses = {}
47
+ filenames = {"nlohmann_json": "LICENSE.MIT", "miniz": "LICENSE"}
48
+ for node in graph["graph"]["nodes"].values():
49
+ if node.get("name") in filenames:
50
+ filename = filenames[node["name"]]
51
+ expected_licenses[filename] = (
52
+ Path(node["package_folder"]) / "licenses" / filename
53
+ ).read_bytes()
54
+ assert expected_licenses.keys() == {"LICENSE.MIT", "LICENSE"}
55
+ return caller / "conan_toolchain.cmake", expected_licenses
56
+
57
+
58
+ @pytest.mark.req("SP-TENSORACLE-063")
59
+ @pytest.mark.req("SP-TENSORACLE-074")
60
+ @pytest.mark.parametrize("shared", ["ON", "OFF"])
61
+ def test_caller_conan_toolchain_builds_and_installs_sdk(tmp_path, caller_dependencies, shared):
62
+ """Both library forms install their SDK and dependency licenses using the caller's graph."""
63
+ toolchain, expected_licenses = caller_dependencies
64
+ build = tmp_path / "build"
65
+ configure = (
66
+ "cmake",
67
+ "-S",
68
+ str(ROOT / "cpp"),
69
+ "-B",
70
+ str(build),
71
+ "-G",
72
+ "Ninja",
73
+ "-DCMAKE_BUILD_TYPE=Release",
74
+ f"-DCMAKE_TOOLCHAIN_FILE={toolchain}",
75
+ f"-DBUILD_SHARED_LIBS={shared}",
76
+ "-DBUILD_TESTING=OFF",
77
+ f"-DTENSORACLE_CONAN_EXECUTABLE={tmp_path / 'missing-conan'}",
78
+ )
79
+ for _ in range(2):
80
+ run(*configure)
81
+ cache = (build / "CMakeCache.txt").read_text()
82
+ entry = next(line for line in cache.splitlines() if line.startswith("CMAKE_TOOLCHAIN_FILE:"))
83
+ assert entry.partition("=")[2] == str(toolchain)
84
+ assert not (build / "conan").exists()
85
+ run("cmake", "--build", str(build), "--parallel", "8")
86
+ prefix = tmp_path / "prefix"
87
+ run("cmake", "--install", str(build), "--prefix", str(prefix))
88
+
89
+ library = "libtensoracle.so*" if shared == "ON" else "libtensoracle.a"
90
+ assert list(prefix.rglob(library))
91
+ assert (prefix / "include/tensoracle/tensoracle.h").is_file()
92
+ assert list(prefix.rglob("tensoracleConfig.cmake"))
93
+ assert (prefix / "licenses/nlohmann-json/LICENSE.MIT").read_bytes() == expected_licenses[
94
+ "LICENSE.MIT"
95
+ ]
96
+ assert (prefix / "licenses/miniz/LICENSE").read_bytes() == expected_licenses["LICENSE"]
@@ -790,7 +790,6 @@ source = { editable = "." }
790
790
  dependencies = [
791
791
  { name = "numpy" },
792
792
  { name = "safetensors" },
793
- { name = "tensorrt-cu13" },
794
793
  ]
795
794
 
796
795
  [package.optional-dependencies]
@@ -805,6 +804,9 @@ producer = [
805
804
  { name = "nvidia-cuda-nvrtc" },
806
805
  { name = "nvidia-nvvm" },
807
806
  ]
807
+ tensorrt = [
808
+ { name = "tensorrt-cu13" },
809
+ ]
808
810
 
809
811
  [package.dev-dependencies]
810
812
  dev = [
@@ -815,6 +817,7 @@ dev = [
815
817
  { name = "mkdocstrings", extra = ["python"] },
816
818
  { name = "pytest" },
817
819
  { name = "ruff" },
820
+ { name = "tensoracle", extra = ["tensorrt"] },
818
821
  ]
819
822
  docs = [
820
823
  { name = "mkdocs" },
@@ -831,10 +834,10 @@ requires-dist = [
831
834
  { name = "nvidia-cuda-nvrtc", marker = "extra == 'producer'", specifier = "==13.2.*" },
832
835
  { name = "nvidia-nvvm", marker = "extra == 'producer'", specifier = "==13.2.*" },
833
836
  { name = "safetensors", specifier = ">=0.4" },
834
- { name = "tensorrt-cu13", specifier = ">=11.2,<12" },
837
+ { name = "tensorrt-cu13", marker = "extra == 'tensorrt'", specifier = ">=11.2,<12" },
835
838
  { name = "torch", marker = "extra == 'convert'", specifier = ">=2.6", index = "https://download.pytorch.org/whl/cpu" },
836
839
  ]
837
- provides-extras = ["convert", "producer"]
840
+ provides-extras = ["convert", "tensorrt", "producer"]
838
841
 
839
842
  [package.metadata.requires-dev]
840
843
  dev = [
@@ -845,6 +848,7 @@ dev = [
845
848
  { name = "mkdocstrings", extras = ["python"], specifier = ">=1.0.6" },
846
849
  { name = "pytest", specifier = ">=8.0" },
847
850
  { name = "ruff", specifier = ">=0.8" },
851
+ { name = "tensoracle", extras = ["tensorrt"] },
848
852
  ]
849
853
  docs = [
850
854
  { name = "mkdocs", specifier = ">=1.6.1" },
File without changes
File without changes
File without changes
File without changes
File without changes