@@ -537,6 +537,42 @@ func getTestCases() []testcase {
537
537
"gpu.intel.com/numa-gpu-map" : "0-0_1-1" ,
538
538
},
539
539
},
540
+ {
541
+ sysfsdirs : []string {
542
+ "card0/device/drm/card0" ,
543
+ "card1/device/drm/card1" ,
544
+ "card1/gt/gt0" ,
545
+ },
546
+ sysfsfiles : map [string ][]byte {
547
+ "card0/device/vendor" : []byte ("0xfefe" ),
548
+ "card0/device/numa_node" : []byte ("0" ),
549
+ "card1/device/vendor" : []byte ("0x8086" ),
550
+ "card1/lmem_total_bytes" : []byte ("8000" ),
551
+ "card1/device/numa_node" : []byte ("1" ),
552
+ },
553
+ name : "successful labeling with one 0x8086 card and numa node info" ,
554
+ memoryOverride : 16000000000 ,
555
+ capabilityFile : map [string ][]byte {
556
+ "1/i915_capabilities" : []byte (
557
+ "platform: newnew\n " +
558
+ "gen: 9" ),
559
+ },
560
+ expectedRetval : nil ,
561
+ expectedLabels : labelMap {
562
+ "gpu.intel.com/graphics_version" : "9" ,
563
+ "gpu.intel.com/media_version" : "9" ,
564
+ "gpu.intel.com/millicores" : "1000" ,
565
+ "gpu.intel.com/memory.max" : "8000" ,
566
+ "gpu.intel.com/platform_newnew.count" : "1" ,
567
+ "gpu.intel.com/platform_newnew.present" : "true" ,
568
+ "gpu.intel.com/platform_newnew.tiles" : "1" ,
569
+ "gpu.intel.com/platform_gen" : "9" ,
570
+ "gpu.intel.com/gpu-numbers" : "1" ,
571
+ "gpu.intel.com/cards" : "card1" ,
572
+ "gpu.intel.com/tiles" : "1" ,
573
+ "gpu.intel.com/numa-gpu-map" : "1-1" ,
574
+ },
575
+ },
540
576
{
541
577
sysfsdirs : []string {
542
578
"card0/device/drm/card0" ,
0 commit comments