step 2
This commit is contained in:
parent
ff83711055
commit
02dffb68b8
1 changed files with 9 additions and 26 deletions
|
@ -219,8 +219,8 @@ 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");
|
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) {
|
static const char *cublas_get_error_str(const int err) {
|
||||||
/*
|
/*
|
||||||
DPCT1009:48: SYCL uses exceptions to report errors and does not use the
|
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
|
error codes. The original code was commented out and a warning string
|
||||||
|
@ -228,24 +228,7 @@ static_assert(sizeof(sycl::half) == sizeof(ggml_fp16_t), "wrong fp16 size");
|
||||||
*/
|
*/
|
||||||
return "cublasGetStatusString is not supported" /*cublasGetStatusString(err)*/
|
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 void ggml_cuda_error(const char * stmt, const char * func, const char * file, const int line, const char * msg) {
|
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);
|
fprintf(stderr, "CUDA error: %s: %s\n", stmt, msg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue