| 33 | //------------------------------- |
| 34 | |
| 35 | static const char* getErrorName(cublasStatus_t status) |
| 36 | { |
| 37 | switch (status) |
| 38 | { |
| 39 | case CUBLAS_STATUS_NOT_INITIALIZED: return "CUBLAS_STATUS_NOT_INITIALIZED: cuBLAS was not initialized"; |
| 40 | case CUBLAS_STATUS_ALLOC_FAILED: return "CUBLAS_STATUS_ALLOC_FAILED: resource allocation failed"; |
| 41 | case CUBLAS_STATUS_INVALID_VALUE: return "CUBLAS_STATUS_INVALID_VALUE: invalid value was passed as argument"; |
| 42 | case CUBLAS_STATUS_ARCH_MISMATCH: return "CUBLAS_STATUS_ARCH_MISMATCH: device architecture not supported"; |
| 43 | case CUBLAS_STATUS_MAPPING_ERROR: return "CUBLAS_STATUS_MAPPING_ERROR: access to GPU memory failed"; |
| 44 | case CUBLAS_STATUS_EXECUTION_FAILED: return "CUBLAS_STATUS_EXECUTION_FAILED: general kernel launch failure"; |
| 45 | case CUBLAS_STATUS_INTERNAL_ERROR: return "CUBLAS_STATUS_INTERNAL_ERROR: an internal error occured"; |
| 46 | case CUBLAS_STATUS_NOT_SUPPORTED: return "CUBLAS_STATUS_NOT_SUPPORTED: functionality is not supported"; |
| 47 | case CUBLAS_STATUS_LICENSE_ERROR: return "CUBLAS_STATUS_LICENSE_ERROR: required licence was not found"; |
| 48 | default: return ""; |
| 49 | } |
| 50 | } |
| 51 | static void cublasSafeCall(cublasStatus_t status, const char *file, const int line) |
| 52 | { |
| 53 | if (CUBLAS_STATUS_SUCCESS != status) { |
nothing calls this directly
no outgoing calls
no test coverage detected