================
@@ -173,11 +191,28 @@ int printGPUsByLevelZero() {
CALL_ZE_AND_CHECK(zeDeviceGet, Driver, &DeviceCount, Devices.data());
for (auto Device : Devices) {
+ ze_device_ip_version_ext_t IPVersion = {};
+ IPVersion.stype = ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT;
+ IPVersion.pNext = nullptr;
+
ze_device_properties_t DeviceProperties = {};
DeviceProperties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
- DeviceProperties.pNext = nullptr;
+ DeviceProperties.pNext = &IPVersion;
CALL_ZE_AND_CHECK(zeDeviceGetProperties, Device, &DeviceProperties);
- llvm::outs() << DeviceProperties.name << '\n';
+
+ if (IPVersion.ipVersion == 0) {
+ if (Verbose)
+ llvm::errs() << "warning: skipping device '" << DeviceProperties.name
+ << "': this version of the Level Zero driver does not "
+ "support ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT, so
"
+ "the device architecture cannot be determined\n";
----------------
KornevNikita wrote:
Okay,
[d7ae1ce](https://github.com/llvm/llvm-project/pull/222072/commits/d7ae1ceeb4eb19ec5f8ceb7e3fda61ad5e5f9a28)
https://github.com/llvm/llvm-project/pull/222072
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits