Skip to content

Commit a69db94

Browse files
authored
[SYCLomatic] Add lit to test DPCT1028 for unsupported device attribute (#696)
Signed-off-by: Jiang, Zhiwei <[email protected]>
1 parent 9e6384d commit a69db94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/test/dpct/driver_device.cu

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ int main(){
138138
// CHECK: MY_SAFE_CALL((result1 = dpct::dev_mgr::instance().get_device(device).get_max_compute_units(), 0));
139139
MY_SAFE_CALL(cuDeviceGetAttribute(&result1, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, device));
140140

141+
// CHECK: /*
142+
// CHECK-NEXT: DPCT1028:{{[0-9]+}}: The cuDeviceGetAttribute was not migrated because parameter CU_DEVICE_ATTRIBUTE_GPU_OVERLAP is unsupported.
143+
// CHECK-NEXT: */
144+
// CHECK-NEXT: cuDeviceGetAttribute(&result1, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, device);
145+
cuDeviceGetAttribute(&result1, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, device);
146+
141147
// CHECK: result1 = dpct::dev_mgr::instance().get_device(device).get_major_version();
142148
// CHECK: result2 = dpct::dev_mgr::instance().get_device(device).get_minor_version();
143149
cuDeviceComputeCapability(&result1, &result2, device);

0 commit comments

Comments
 (0)