| 78 | PLUGIN_REGISTRY_DEFINE_PLUGIN_ID(kCuBlasPlugin); |
| 79 | |
| 80 | static string ToString(cublasStatus_t status) { |
| 81 | switch (status) { |
| 82 | case CUBLAS_STATUS_SUCCESS: |
| 83 | return "CUBLAS_STATUS_SUCCESS"; |
| 84 | case CUBLAS_STATUS_NOT_INITIALIZED: |
| 85 | return "CUBLAS_STATUS_NOT_INITIALIZED"; |
| 86 | case CUBLAS_STATUS_ALLOC_FAILED: |
| 87 | return "CUBLAS_STATUS_ALLOC_FAILED"; |
| 88 | case CUBLAS_STATUS_INVALID_VALUE: |
| 89 | return "CUBLAS_STATUS_INVALID_VALUE"; |
| 90 | case CUBLAS_STATUS_ARCH_MISMATCH: |
| 91 | return "CUBLAS_STATUS_ARCH_MISMATCH"; |
| 92 | case CUBLAS_STATUS_MAPPING_ERROR: |
| 93 | return "CUBLAS_STATUS_MAPPING_ERROR"; |
| 94 | case CUBLAS_STATUS_EXECUTION_FAILED: |
| 95 | return "CUBLAS_STATUS_EXECUTION_FAILED"; |
| 96 | case CUBLAS_STATUS_INTERNAL_ERROR: |
| 97 | return "CUBLAS_STATUS_INTERNAL_ERROR"; |
| 98 | #if CUDA_VERSION >= 8000 |
| 99 | case CUBLAS_STATUS_NOT_SUPPORTED: |
| 100 | return "CUBLAS_STATUS_NOT_SUPPORTED"; |
| 101 | case CUBLAS_STATUS_LICENSE_ERROR: |
| 102 | return "CUBLAS_STATUS_LICENSE_ERROR"; |
| 103 | #endif |
| 104 | default: |
| 105 | return absl::StrCat("<invalid cublas status: ", status, ">"); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | // cuBLAS has interfaces that permit pointers to be passed from either the host |
| 110 | // memory space or the device memory space; however, you must instruct it as to |
no test coverage detected