This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 956b65910c fix: guard tensormap with cuda version check (#18107)
956b65910c is described below

commit 956b65910c475789be4ea5ec0a39a81af99bcfd8
Author: Bohan Hou <[email protected]>
AuthorDate: Wed Jul 2 10:30:37 2025 -0400

    fix: guard tensormap with cuda version check (#18107)
---
 src/runtime/cuda/cuda_device_api.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/runtime/cuda/cuda_device_api.cc 
b/src/runtime/cuda/cuda_device_api.cc
index 2af0bf1595..91702d0354 100644
--- a/src/runtime/cuda/cuda_device_api.cc
+++ b/src/runtime/cuda/cuda_device_api.cc
@@ -357,6 +357,7 @@ TVM_DLL int GetCudaDeviceCount() {
 
 
TVM_FFI_REGISTER_GLOBAL("runtime.GetCudaDeviceCount").set_body_typed(GetCudaDeviceCount);
 
+#if (CUDA_VERSION >= 12000)
 /**
  * \brief FFI wrapper for cuTensorMapEncodeTiled.
  *
@@ -562,6 +563,7 @@ TVM_FFI_REGISTER_GLOBAL("runtime.cuTensorMapEncodeTiled")
         CHECK_EQ(res, CUDA_SUCCESS) << "Error in cuTensorMapEncodeTiled: " << 
errstr;
       }
     });
+#endif  // CUDA_VERSION >= 12000
 
 }  // namespace runtime
 }  // namespace tvm

Reply via email to