@@ -1014,6 +1014,7 @@ def get_sycl_ls_verbose(sycl_device, env):
10141014 dev_aspects = []
10151015 dev_sg_sizes = []
10161016 architectures = set ()
1017+ device_names = set ()
10171018 # See format.py's parse_min_intel_driver_req for explanation.
10181019 is_intel_driver = False
10191020 intel_driver_ver = {}
@@ -1055,8 +1056,11 @@ def get_sycl_ls_verbose(sycl_device, env):
10551056 if re .match (r" *Architecture:" , line ):
10561057 _ , architecture = line .strip ().split (":" , 1 )
10571058 architectures .add (architecture .strip ())
1058- if re .match (r" *Name *:" , line ) and "Level-Zero V2" in line :
1059- features .add ("level_zero_v2_adapter" )
1059+ if re .match (r" *Name *:" , line ):
1060+ _ , device_name_str = line .strip ().split (":" , 1 )
1061+ device_names .add (device_name_str .strip ())
1062+ if "Level-Zero V2" in line :
1063+ features .add ("level_zero_v2_adapter" )
10601064
10611065 # TODO change to the set of backends
10621066 if re .match (r"\[offload:.*" , line ) and not is_offload_preferred_backend_set :
@@ -1124,10 +1128,24 @@ def get_sycl_ls_verbose(sycl_device, env):
11241128 )
11251129 )
11261130
1131+ # Add a normalized device-name feature, e.g. "gpu-nvidia-geforce-rtx-3090"
1132+ # derived from the "Name :" field reported by sycl-ls --verbose.
1133+ device_name_features = set (
1134+ "gpu-" + re .sub (r"[^a-z0-9]+" , "-" , name .lower ()).strip ("-" )
1135+ for name in device_names
1136+ )
1137+ if device_name_features :
1138+ lit_config .note (
1139+ "Device name features for {}: {}" .format (
1140+ sycl_device , ", " .join (device_name_features )
1141+ )
1142+ )
1143+
11271144 features .update (aspect_features )
11281145 features .update (sg_size_features )
11291146 features .update (architecture_feature )
11301147 features .update (device_family )
1148+ features .update (device_name_features )
11311149
11321150 be , dev = sycl_device .split (":" )
11331151 if dev .isdigit ():
0 commit comments