py-onnxruntime: use CudaPackage (#47684)

This commit is contained in:
Wouter Deconinck 2025-03-17 04:35:20 -05:00 committed by GitHub
parent 0f84623914
commit e15a530f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@
from spack.package import * from spack.package import *
class PyOnnxruntime(CMakePackage, PythonExtension, ROCmPackage): class PyOnnxruntime(CMakePackage, PythonExtension, ROCmPackage, CudaPackage):
"""ONNX Runtime is a performance-focused complete scoring """ONNX Runtime is a performance-focused complete scoring
engine for Open Neural Network Exchange (ONNX) models, with engine for Open Neural Network Exchange (ONNX) models, with
an open extensible architecture to continually address the an open extensible architecture to continually address the
@ -35,8 +35,6 @@ class PyOnnxruntime(CMakePackage, PythonExtension, ROCmPackage):
depends_on("c", type="build") # generated depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated depends_on("cxx", type="build") # generated
variant("cuda", default=False, description="Build with CUDA support")
# cmake/CMakeLists.txt # cmake/CMakeLists.txt
depends_on("cmake@3.26:", when="@1.17:", type="build") depends_on("cmake@3.26:", when="@1.17:", type="build")
depends_on("cmake@3.1:", type="build") depends_on("cmake@3.1:", type="build")