Skip to content

Commit 956b659

Browse files
fix: guard tensormap with cuda version check (#18107)
1 parent 17113f8 commit 956b659

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/runtime/cuda/cuda_device_api.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ TVM_DLL int GetCudaDeviceCount() {
357357

358358
TVM_FFI_REGISTER_GLOBAL("runtime.GetCudaDeviceCount").set_body_typed(GetCudaDeviceCount);
359359

360+
#if (CUDA_VERSION >= 12000)
360361
/**
361362
* \brief FFI wrapper for cuTensorMapEncodeTiled.
362363
*
@@ -562,6 +563,7 @@ TVM_FFI_REGISTER_GLOBAL("runtime.cuTensorMapEncodeTiled")
562563
CHECK_EQ(res, CUDA_SUCCESS) << "Error in cuTensorMapEncodeTiled: " << errstr;
563564
}
564565
});
566+
#endif // CUDA_VERSION >= 12000
565567

566568
} // namespace runtime
567569
} // namespace tvm

0 commit comments

Comments
 (0)