@@ -17,17 +17,6 @@ std::conditional_t<THRW, void, OrtStatus*> CudaCall(
1717 ERRTYPE retCode, const char * exprString, const char * libName, ERRTYPE successCode, const char * msg, const char * file, const int line) {
1818 if (retCode != successCode) {
1919 try {
20- // #ifdef _WIN32
21- // std::string hostname_str = GetEnvironmentVar("COMPUTERNAME");
22- // if (hostname_str.empty()) {
23- // hostname_str = "?";
24- // }
25- // const char* hostname = hostname_str.c_str();
26- // #else
27- // char hostname[HOST_NAME_MAX];
28- // if (gethostname(hostname, HOST_NAME_MAX) != 0)
29- // strcpy(hostname, "?");
30- // #endif
3120 int currentCudaDevice = -1 ;
3221 cudaGetDevice (¤tCudaDevice);
3322 cudaGetLastError (); // clear last CUDA error
@@ -55,9 +44,5 @@ std::conditional_t<THRW, void, OrtStatus*> CudaCall(
5544 }
5645}
5746
58- // template <typename ERRTYPE, bool THRW>
59- // std::conditional_t<THRW, void, Status> CudaCall(
60- // ERRTYPE retCode, const char* exprString, const char* libName, ERRTYPE successCode, const char* msg, const char* file, const int line);
61-
6247#define CUDA_CALL (expr ) (CudaCall<cudaError, false >((expr), #expr, " CUDA" , cudaSuccess, " " , __FILE__, __LINE__))
6348#define CUDA_CALL_THROW (expr ) (CudaCall<cudaError, true >((expr), #expr, " CUDA" , cudaSuccess, " " , __FILE__, __LINE__))
0 commit comments