From f9d2ebe0e20a14c916605c99ae6ccd805f1052db Mon Sep 17 00:00:00 2001 From: spectrometerHBH Date: Tue, 1 Jul 2025 14:45:44 -0400 Subject: [PATCH 1/2] rebase --- src/runtime/cuda/cuda_device_api.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/cuda/cuda_device_api.cc b/src/runtime/cuda/cuda_device_api.cc index 2af0bf159529..7a678609014a 100644 --- a/src/runtime/cuda/cuda_device_api.cc +++ b/src/runtime/cuda/cuda_device_api.cc @@ -357,6 +357,8 @@ TVM_DLL int GetCudaDeviceCount() { TVM_FFI_REGISTER_GLOBAL("runtime.GetCudaDeviceCount").set_body_typed(GetCudaDeviceCount); +#ifdef __CUDACC__ +#if (CUDA_VERSION >= 12000) /** * \brief FFI wrapper for cuTensorMapEncodeTiled. * @@ -562,6 +564,8 @@ TVM_FFI_REGISTER_GLOBAL("runtime.cuTensorMapEncodeTiled") CHECK_EQ(res, CUDA_SUCCESS) << "Error in cuTensorMapEncodeTiled: " << errstr; } }); +#endif // CUDA_VERSION >= 12000 +#endif // __CUDACC__ } // namespace runtime } // namespace tvm From 4000b73169f1284a665545ba6520c398b763d172 Mon Sep 17 00:00:00 2001 From: spectrometerHBH Date: Tue, 1 Jul 2025 15:14:27 -0400 Subject: [PATCH 2/2] dev --- src/runtime/cuda/cuda_device_api.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/runtime/cuda/cuda_device_api.cc b/src/runtime/cuda/cuda_device_api.cc index 7a678609014a..91702d035482 100644 --- a/src/runtime/cuda/cuda_device_api.cc +++ b/src/runtime/cuda/cuda_device_api.cc @@ -357,7 +357,6 @@ TVM_DLL int GetCudaDeviceCount() { TVM_FFI_REGISTER_GLOBAL("runtime.GetCudaDeviceCount").set_body_typed(GetCudaDeviceCount); -#ifdef __CUDACC__ #if (CUDA_VERSION >= 12000) /** * \brief FFI wrapper for cuTensorMapEncodeTiled. @@ -565,7 +564,6 @@ TVM_FFI_REGISTER_GLOBAL("runtime.cuTensorMapEncodeTiled") } }); #endif // CUDA_VERSION >= 12000 -#endif // __CUDACC__ } // namespace runtime } // namespace tvm