marin-ma commented on code in PR #11830:
URL: https://github.com/apache/gluten/pull/11830#discussion_r3721022861
##########
cpp/velox/compute/VeloxBackend.cc:
##########
@@ -120,6 +120,16 @@ ThreadManager* veloxThreadManagerFactory(const
std::string& kind, std::unique_pt
void veloxThreadManagerReleaser(ThreadManager* threadManager) {
delete threadManager;
}
+
+bool hasCudaRuntimeAndDevice() {
+#ifdef GLUTEN_ENABLE_GPU
+ int count = 0;
+ cudaError_t err = cudaGetDeviceCount(&count);
+ return err == cudaSuccess && count > 0;
+#else
+ return false;
+#endif
+}
Review Comment:
Renamed to `hasCudaDevice`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]