@@ -553,10 +553,25 @@ Error L0DeviceTy::initDeviceInfoImpl(__tgt_device_info *Info) {
553553 return Plugin::success ();
554554}
555555
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+
556562Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl () {
557563 InfoTreeNode Info;
558564 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);
560575 Info.add (" Device PCI ID" , getPCIId ());
561576 Info.add (" Device UUID" , getUuid ().data ());
562577 Info.add (" Number of total EUs" , getNumEUs ());
@@ -566,9 +581,10 @@ Expected<InfoTreeNode> L0DeviceTy::obtainInfoImpl() {
566581 Info.add (" Number of subslices per slice" , getNumSubslicesPerSlice ());
567582 Info.add (" Number of slices" , getNumSlices ());
568583 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 );
570585 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);
572588 return Info;
573589}
574590
0 commit comments