-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcu_error_list.cu
153 lines (148 loc) · 5.73 KB
/
cu_error_list.cu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#include "imp_includes.hcu"
// cuBLAS API errors
const char *cublasGetErrorString(cublasStatus_t err)
{
switch (err) {
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_err:
// return "CUBLAS_STATUS_MAPPING_err";
case CUBLAS_STATUS_EXECUTION_FAILED:
return "CUBLAS_STATUS_EXECUTION_FAILED";
// case CUBLAS_STATUS_INTERNAL_err:
// return "CUBLAS_STATUS_INTERNAL_err";
case CUBLAS_STATUS_NOT_SUPPORTED:
return "CUBLAS_STATUS_NOT_SUPPORTED";
// case CUBLAS_STATUS_LICENSE_err:
// return "CUBLAS_STATUS_LICENSE_err";
}
return "<unknown>";
}
// cuSOLVER API errors
const char *cusolverGetErrorString(cusolverStatus_t err)
{
switch (err) {
case CUSOLVER_STATUS_NOT_INITIALIZED:
return "CUSOLVER_STATUS_NOT_INITIALIZED";
case CUSOLVER_STATUS_ALLOC_FAILED:
return "CUSOLVER_STATUS_ALLOC_FAILED";
case CUSOLVER_STATUS_INVALID_VALUE:
return "CUSOLVER_STATUS_INVALID_VALUE";
case CUSOLVER_STATUS_ARCH_MISMATCH:
return "CUSOLVER_STATUS_ARCH_MISMATCH";
// case CUSOLVER_STATUS_MAPPING_err:
// return "CUSOLVER_STATUS_MAPPING_err";
case CUSOLVER_STATUS_EXECUTION_FAILED:
return "CUSOLVER_STATUS_EXECUTION_FAILED";
// case CUSOLVER_STATUS_INTERNAL_err:
// return "CUSOLVER_STATUS_INTERNAL_err";
case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED:
return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED";
case CUSOLVER_STATUS_NOT_SUPPORTED:
return "CUSOLVER_STATUS_NOT_SUPPORTED ";
case CUSOLVER_STATUS_ZERO_PIVOT:
return "CUSOLVER_STATUS_ZERO_PIVOT";
case CUSOLVER_STATUS_INVALID_LICENSE:
return "CUSOLVER_STATUS_INVALID_LICENSE";
}
return "<unknown>";
}
// cuRAND API errors
const char *curandGetErrorString(curandStatus_t err)
{
switch (err) {
case CURAND_STATUS_VERSION_MISMATCH:
return "CURAND_STATUS_VERSION_MISMATCH";
case CURAND_STATUS_NOT_INITIALIZED:
return "CURAND_STATUS_NOT_INITIALIZED";
case CURAND_STATUS_ALLOCATION_FAILED:
return "CURAND_STATUS_ALLOCATION_FAILED";
// case CURAND_STATUS_TYPE_err:
// return "CURAND_STATUS_TYPE_err";
case CURAND_STATUS_OUT_OF_RANGE:
return "CURAND_STATUS_OUT_OF_RANGE";
case CURAND_STATUS_LENGTH_NOT_MULTIPLE:
return "CURAND_STATUS_LENGTH_NOT_MULTIPLE";
case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED:
return "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED";
case CURAND_STATUS_LAUNCH_FAILURE:
return "CURAND_STATUS_LAUNCH_FAILURE";
case CURAND_STATUS_PREEXISTING_FAILURE:
return "CURAND_STATUS_PREEXISTING_FAILURE";
case CURAND_STATUS_INITIALIZATION_FAILED:
return "CURAND_STATUS_INITIALIZATION_FAILED";
case CURAND_STATUS_ARCH_MISMATCH:
return "CURAND_STATUS_ARCH_MISMATCH";
// case CURAND_STATUS_INTERNAL_err:
// return "CURAND_STATUS_INTERNAL_err";
}
return "<unknown>";
}
// cuFFT API errors
// static const char *cufftGetErrorString(cufftResult err)
// {
// switch (err) {
// case CUFFT_INVALID_PLAN:
// return "CUFFT_INVALID_PLAN";
// case CUFFT_ALLOC_FAILED:
// return "CUFFT_ALLOC_FAILED";
// case CUFFT_INVALID_TYPE:
// return "CUFFT_INVALID_TYPE";
// case CUFFT_INVALID_VALUE:
// return "CUFFT_INVALID_VALUE";
// case CUFFT_INTERNAL_err:
// return "CUFFT_INTERNAL_err";
// case CUFFT_EXEC_FAILED:
// return "CUFFT_EXEC_FAILED";
// case CUFFT_SETUP_FAILED:
// return "CUFFT_SETUP_FAILED";
// case CUFFT_INVALID_SIZE:
// return "CUFFT_INVALID_SIZE";
// case CUFFT_UNALIGNED_DATA:
// return "CUFFT_UNALIGNED_DATA";
// case CUFFT_INCOMPLETE_PARAMETER_LIST:
// return "CUFFT_INCOMPLETE_PARAMETER_LIST";
// case CUFFT_INVALID_DEVICE:
// return "CUFFT_INVALID_DEVICE";
// case CUFFT_PARSE_err:
// return "CUFFT_PARSE_err";
// case CUFFT_NO_WORKSPACE:
// return "CUFFT_NO_WORKSPACE";
// case CUFFT_NOT_IMPLEMENTED:
// return "CUFFT_NOT_IMPLEMENTED";
// case CUFFT_LICENSE_err:
// return "CUFFT_LICENSE_err";
// case CUFFT_NOT_SUPPORTED:
// return "CUFFT_NOT_SUPPORTED";
// }
// return "<unknown>";
// }
// cuSPARSE API errors
// static const char *cusparseGetErrorString(cusparseStatus_t err)
// {
// switch (err) {
// case CUSPARSE_STATUS_NOT_INITIALIZED:
// return "CUSPARSE_STATUS_NOT_INITIALIZED";
// case CUSPARSE_STATUS_ALLOC_FAILED:
// return "CUSPARSE_STATUS_ALLOC_FAILED";
// case CUSPARSE_STATUS_INVALID_VALUE:
// return "CUSPARSE_STATUS_INVALID_VALUE";
// case CUSPARSE_STATUS_ARCH_MISMATCH:
// return "CUSPARSE_STATUS_ARCH_MISMATCH";
// case CUSPARSE_STATUS_MAPPING_err:
// return "CUSPARSE_STATUS_MAPPING_err";
// case CUSPARSE_STATUS_EXECUTION_FAILED:
// return "CUSPARSE_STATUS_EXECUTION_FAILED";
// case CUSPARSE_STATUS_INTERNAL_err:
// return "CUSPARSE_STATUS_INTERNAL_err";
// case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED:
// return "CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED";
// }
// return "<unknown>";
// }