Skip to content

Commit 1bbab12

Browse files
authored
[SYCL] Added test for ext_intel_device_id (intel/llvm-test-suite#1320)
This commit adds test for `ext_intel_device_id` introduced in intel#7010
1 parent f70f93f commit 1bbab12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SYCL/Basic/intel-ext-device.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ int main(int argc, char **argv) {
122122
}
123123
std::cout << "\n";
124124
}
125+
if (SYCL_EXT_INTEL_DEVICE_INFO >= 5 &&
126+
dev.has(aspect::ext_intel_device_id)) {
127+
int deviceID =
128+
dev.get_info<ext::intel::info::device::device_id>();
129+
std::cout << "Device ID = " << deviceID << std::endl;
130+
}
125131
} // SYCL_EXT_INTEL_DEVICE_INFO
126132
}
127133

0 commit comments

Comments
 (0)