@@ -553,10 +553,25 @@ Error L0DeviceTy::initDeviceInfoImpl(__tgt_device_info *Info) {
553
553
return Plugin::success ();
554
554
}
555
555
556
+ static const char *DriverVersionToStrTable[] = {
557
+ " 1.0" , " 1.1" , " 1.2" , " 1.3" , " 1.4" , " 1.5" , " 1.6" ,
558
+ " 1.7" , " 1.8" , " 1.9" , " 1.10" , " 1.11" , " 1.12" };
559
+ constexpr size_t DriverVersionToStrTableSize =
560
+ sizeof (DriverVersionToStrTable) / sizeof (DriverVersionToStrTable[0 ]);
561
+
556
562
Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl () {
557
563
InfoTreeNode Info;
558
564
Info.add (" Device Number" , getDeviceId ());
559
- Info.add (" Device Name" , getNameCStr ());
565
+ Info.add (" Device Name" , getNameCStr (), " " , DeviceInfo::NAME);
566
+ Info.add (" Device Type" , " GPU" , " " , DeviceInfo::TYPE);
567
+ Info.add (" Vendor" , " Intel" , " " , DeviceInfo::VENDOR);
568
+ Info.add (" Vendor ID" , getVendorId (), " " , DeviceInfo::VENDOR_ID);
569
+ auto DriverVersion = getDriverAPIVersion ();
570
+ if (DriverVersion < DriverVersionToStrTableSize)
571
+ Info.add (" Driver Version" , DriverVersionToStrTable[DriverVersion], " " ,
572
+ DeviceInfo::DRIVER_VERSION);
573
+ else
574
+ Info.add (" Driver Version" , " Unknown" , " " , DeviceInfo::DRIVER_VERSION);
560
575
Info.add (" Device PCI ID" , getPCIId ());
561
576
Info.add (" Device UUID" , getUuid ().data ());
562
577
Info.add (" Number of total EUs" , getNumEUs ());
@@ -566,9 +581,10 @@ Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl() {
566
581
Info.add (" Number of subslices per slice" , getNumSubslicesPerSlice ());
567
582
Info.add (" Number of slices" , getNumSlices ());
568
583
Info.add (" Local memory size (bytes)" , getMaxSharedLocalMemory ());
569
- Info.add (" Global memory size (bytes)" , getGlobalMemorySize ());
584
+ Info.add (" Global memory size (bytes)" , getGlobalMemorySize (), " " , DeviceInfo::GLOBAL_MEM_SIZE );
570
585
Info.add (" Cache size (bytes)" , getCacheSize ());
571
- Info.add (" Max clock frequency (MHz)" , getClockRate ());
586
+ Info.add (" Max Memory Allocation Size (bytes)" , getMaxMemAllocSize (), " " , DeviceInfo::MAX_MEM_ALLOC_SIZE);
587
+ Info.add (" Max clock frequency (MHz)" , getClockRate (), " " , DeviceInfo::MAX_CLOCK_FREQUENCY);
572
588
return Info;
573
589
}
574
590
0 commit comments