================
@@ -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:

It's a driver version that doesn't support the extension rather than a device 
itself, isn't it?
Would this make sense?
```suggestion
          llvm::errs() << "warning: skipping device '" << DeviceProperties.name
                       << "': this version of the Level Zero driver does not "
                          "support the Device IP Version Extension, the device "
                                                  "architecture cannot be 
determined\n";
```

https://github.com/llvm/llvm-project/pull/222072
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to