diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index 7b502b3b4..08aef929a 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -219,33 +219,16 @@ static __device__ __forceinline__ int __dp4a(const int a, const int b, int c) { static_assert(sizeof(sycl::half) == sizeof(ggml_fp16_t), "wrong fp16 size"); -#if DPCT_COMPAT_RT_VERSION >= 12000 - static const char *cublas_get_error_str(const int err) { - /* - DPCT1009:48: SYCL uses exceptions to report errors and does not use the - error codes. The original code was commented out and a warning string - was inserted. You need to rewrite this code. - */ - return "cublasGetStatusString is not supported" /*cublasGetStatusString(err)*/ - ; - } -#else - static const char * cublas_get_error_str(const cublasStatus_t err) { - switch (err) { - case CUBLAS_STATUS_SUCCESS: return "CUBLAS_STATUS_SUCCESS"; - case CUBLAS_STATUS_NOT_INITIALIZED: return "CUBLAS_STATUS_NOT_INITIALIZED"; - case CUBLAS_STATUS_ALLOC_FAILED: return "CUBLAS_STATUS_ALLOC_FAILED"; - case CUBLAS_STATUS_INVALID_VALUE: return "CUBLAS_STATUS_INVALID_VALUE"; - case CUBLAS_STATUS_ARCH_MISMATCH: return "CUBLAS_STATUS_ARCH_MISMATCH"; - case CUBLAS_STATUS_MAPPING_ERROR: return "CUBLAS_STATUS_MAPPING_ERROR"; - case CUBLAS_STATUS_EXECUTION_FAILED: return "CUBLAS_STATUS_EXECUTION_FAILED"; - case CUBLAS_STATUS_INTERNAL_ERROR: return "CUBLAS_STATUS_INTERNAL_ERROR"; - case CUBLAS_STATUS_NOT_SUPPORTED: return "CUBLAS_STATUS_NOT_SUPPORTED"; - default: return "unknown error"; - } - } -#endif // CUDART_VERSION >= 12000 +static const char *cublas_get_error_str(const int err) { + /* + DPCT1009:48: SYCL uses exceptions to report errors and does not use the + error codes. The original code was commented out and a warning string + was inserted. You need to rewrite this code. + */ + return "cublasGetStatusString is not supported" /*cublasGetStatusString(err)*/ + ; +} static void ggml_cuda_error(const char * stmt, const char * func, const char * file, const int line, const char * msg) { fprintf(stderr, "CUDA error: %s: %s\n", stmt, msg);