Skip to content

Commit e744c15

Browse files
authored
[SYCLomatic] Fix lit.local.cfg to run the lit test specified if the dependent library is available (#2819)
Signed-off-by: chenwei.sun <chenwei.sun@intel.com>
1 parent 971e72b commit e744c15

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

clang/test/dpct/lit.local.cfg

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,38 @@ else:
124124

125125
# Run the dpct sanity test.
126126
if not config.unsupported:
127-
skipped_cases = ["cudnn_sanity.cu", "nccl_sanity.cu", "nvshmem.cu", "cutensor.cu"]
128-
complete_process = run_sanity("cudnn_sanity.cu")
127+
skipped_cases = []
129128
err_message = ""
129+
130+
complete_process = run_sanity("cudnn_sanity.cu")
130131
if complete_process.returncode != 0:
131132
if "'cudnn.h' file not found" in complete_process.stdout:
132133
err_message += "'cudnn.h' header file not found in platform. " + \
133134
"Please make sure install the header file of cuDNN and " + \
134135
"export cudnn.h in CPATH\n"
135136
skipped_cases.extend(get_skipped_cases_with_string("<cudnn.h>"))
136137
complete_process = run_sanity("nccl_sanity.cu")
138+
137139
if complete_process.returncode != 0:
138140
if "'nccl.h' file not found" in complete_process.stdout:
139141
err_message += "'nccl.h' header file not found in platform. " + \
140142
"Please make sure install the header file of NCCL and " + \
141143
"export nccl.h in CPATH.\n"
142144
skipped_cases.extend(get_skipped_cases_with_string("<nccl.h>"))
145+
143146
complete_process = run_sanity("nvshmem.cu")
144-
if complete_process.returncode != 0:
145-
if "'nvshmem.h' file not found" in complete_process.stdout:
146-
err_message += "'nvshmem.h' header file not found in platform. " + \
147-
"Please make sure install the header file of nvshmem and " + \
148-
"export nvshmem.h in CPATH.\n"
149-
skipped_cases.extend(get_skipped_cases_with_string("<nccl.h>"))
147+
if "'nvshmem.h' file not found" in complete_process.stdout:
148+
err_message += "'nvshmem.h' header file not found in platform. " + \
149+
"Please make sure install the header file of nvshmem and " + \
150+
"export nvshmem.h in CPATH.\n"
151+
skipped_cases.extend(get_skipped_cases_with_string("<nvshmem.h>"))
152+
150153
complete_process = run_sanity("cutensor.cu")
151-
if complete_process.returncode != 0:
152-
if "'cutensor.h' file not found" in complete_process.stdout:
153-
err_message += "'cutensor.h' header file not found in platform. " + \
154-
"Please make sure install the header file of cuTENSOR and " + \
155-
"export cutensor.h in CPATH.\n"
156-
skipped_cases.extend(get_skipped_cases_with_string("<cutensor.h>"))
154+
if "'cutensor.h' file not found" in complete_process.stdout:
155+
err_message += "'cutensor.h' header file not found in platform. " + \
156+
"Please make sure install the header file of cuTENSOR and " + \
157+
"export cutensor.h in CPATH.\n"
158+
skipped_cases.extend(get_skipped_cases_with_string("<cutensor.h>"))
157159

158160
if (err_message):
159161
sys.stderr.write(err_message)

0 commit comments

Comments
 (0)