MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / throwCublasError

Function throwCublasError

plugin/common/checkMacrosPlugin.cpp:65–88  ·  view source on GitHub ↗

break-pointable

Source from the content-addressed store, hash-verified

63
64// break-pointable
65void throwCublasError(char const* file, char const* function, int32_t line, int32_t status, char const* msg)
66{
67 if (msg == nullptr)
68 {
69 auto s_ = static_cast<cublasStatus_t>(status);
70 switch (s_)
71 {
72 case CUBLAS_STATUS_SUCCESS: msg = "CUBLAS_STATUS_SUCCESS"; break;
73 case CUBLAS_STATUS_NOT_INITIALIZED: msg = "CUBLAS_STATUS_NOT_INITIALIZED"; break;
74 case CUBLAS_STATUS_ALLOC_FAILED: msg = "CUBLAS_STATUS_ALLOC_FAILED"; break;
75 case CUBLAS_STATUS_INVALID_VALUE: msg = "CUBLAS_STATUS_INVALID_VALUE"; break;
76 case CUBLAS_STATUS_ARCH_MISMATCH: msg = "CUBLAS_STATUS_ARCH_MISMATCH"; break;
77 case CUBLAS_STATUS_MAPPING_ERROR: msg = "CUBLAS_STATUS_MAPPING_ERROR"; break;
78 case CUBLAS_STATUS_EXECUTION_FAILED: msg = "CUBLAS_STATUS_EXECUTION_FAILED"; break;
79 case CUBLAS_STATUS_INTERNAL_ERROR: msg = "CUBLAS_STATUS_INTERNAL_ERROR"; break;
80 case CUBLAS_STATUS_NOT_SUPPORTED: msg = "CUBLAS_STATUS_NOT_SUPPORTED"; break;
81 case CUBLAS_STATUS_LICENSE_ERROR: msg = "CUBLAS_STATUS_LICENSE_ERROR"; break;
82 }
83 }
84 CublasError error(file, function, line, status, msg);
85 error.log(gLogError);
86 // NOLINTNEXTLINE(misc-throw-by-value-catch-by-reference)
87 throw error;
88}
89
90// break-pointable
91void throwCudnnError(char const* file, char const* function, int32_t line, int32_t status, char const* msg)

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected