Skip to content

Commit be6c100

Browse files
LU-JOHN0x12CC
andauthored
[SYCLomatic #514] Test cudnnGetErrorString (#203)
* [SYCLomatic #514] Test cudnnGetErrorString Rebasing Signed-off-by: Lu, John <[email protected]> * Add cudnn-GetErrorString to oneDNN_related so -ldnnl will be added. Signed-off-by: Lu, John <[email protected]> * Update features/feature_case/dnn/cudnn-GetErrorString.cu Co-authored-by: 0x12CC <[email protected]> * Initialize status string Signed-off-by: Lu, John <[email protected]> --------- Signed-off-by: Lu, John <[email protected]> Co-authored-by: 0x12CC <[email protected]>
1 parent ae71a8f commit be6c100

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "cudnn.h"
2+
#include <iostream>
3+
4+
int main() {
5+
cudnnStatus_t status{CUDNN_STATUS_SUCCESS};
6+
7+
const char *msg=cudnnGetErrorString(status);
8+
9+
if (!msg)
10+
return 1;
11+
12+
std::cout << "string = " << msg << "\n";
13+
14+
return 0;
15+
}

features/features.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<test testName="cub_constant_iterator" configFile="config/TEMPLATE_cub_device.xml" />
141141
<test testName="cub_arg_index_input_iterator" configFile="config/TEMPLATE_cub_device.xml" />
142142
<test testName="cudnn_multiple_files" configFile="config/TEMPLATE_cudnn_multiple_files.xml" />
143+
<test testName="cudnn-GetErrorString" configFile="config/TEMPLATE_cuDNN.xml" />
143144
<test testName="cudnn-activation" configFile="config/TEMPLATE_cuDNN.xml" />
144145
<test testName="cudnn-fill" configFile="config/TEMPLATE_cuDNN.xml" />
145146
<test testName="cudnn-lrn" configFile="config/TEMPLATE_cuDNN.xml" />

features/test_feature.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
'math-bfloat16', 'libcu_atomic', 'test_shared_memory', 'cudnn-reduction', 'cudnn-binary', 'cudnn-bnp1', 'cudnn-bnp2', 'cudnn-bnp3',
3636
'cudnn-normp1', 'cudnn-normp2', 'cudnn-normp3', 'cudnn-convp1', 'cudnn-convp2', 'cudnn-convp3', 'cudnn-convp4', 'cudnn-convp5',
3737
'cudnn_mutilple_files', "cusparse_1",
38+
'cudnn-GetErrorString',
3839
'constant_attr',
3940
'thrust-unique_by_key', 'cufft_test', 'cufft-external-workspace', "pointer_attributes", 'math_intel_specific', 'math-drcp', 'thrust-pinned-allocator', 'driverMem',
4041
'cusolver_test1', 'cusolver_test2', 'thrust_op', 'cublas-extension', 'cublas_v1_runable', 'thrust_minmax_element',
@@ -116,7 +117,9 @@ def build_test():
116117
oneDNN_related = ['cudnn-activation', 'cudnn-fill', 'cudnn-lrn', 'cudnn-memory',
117118
'cudnn-pooling', 'cudnn-reorder', 'cudnn-scale', 'cudnn-softmax', 'cudnn-sum', 'cudnn-reduction',
118119
'cudnn-binary', 'cudnn-bnp1', 'cudnn-bnp2', 'cudnn-bnp3', 'cudnn-normp1', 'cudnn-normp2', 'cudnn-normp3',
119-
'cudnn-convp1', 'cudnn-convp2', 'cudnn-convp3', 'cudnn-convp4', 'cudnn-convp5', 'cudnn-rnn']
120+
'cudnn-convp1', 'cudnn-convp2', 'cudnn-convp3', 'cudnn-convp4', 'cudnn-convp5', 'cudnn-rnn',
121+
'cudnn-GetErrorString',
122+
]
120123

121124
if test_config.current_test in oneDPL_related:
122125
cmp_options.append(prepare_oneDPL_specific_macro())

0 commit comments

Comments
 (0)