File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,11 @@ def get_extra_env(sycl_devices):
368368 "linux" ,
369369 "windows" ,
370370 "preview-breaking-changes-supported" ,
371+ # the following entries are used by architecture-based filtering
372+ # (:arch- device, not :gpu or :cpu)
373+ "cpu" ,
374+ "gpu" ,
375+ "accelerator" ,
371376 ]:
372377 if cond_features in test .config .available_features :
373378 conditions [cond_features ] = True
Original file line number Diff line number Diff line change @@ -1156,6 +1156,13 @@ def get_sycl_ls_verbose(sycl_device, env):
11561156 else :
11571157 config .intel_driver_ver [full_name ] = {}
11581158
1159+ # When running with a single device, merge device-specific features into global
1160+ # available_features so that %if conditionals work correctly, even if device is not :gpu or :cpu
1161+ if len (config .sycl_devices ) == 1 :
1162+ single_device = list (config .sycl_dev_features .keys ())[0 ]
1163+ device_features = config .sycl_dev_features [single_device ]
1164+ config .available_features .update (device_features )
1165+
11591166if lit_config .params .get ("compatibility_testing" , "False" ) != "False" :
11601167 config .substitutions .append (("%clangxx" , " true " ))
11611168 config .substitutions .append (("%clang" , " true " ))
You can’t perform that action at this time.
0 commit comments