Skip to content

Commit e83a640

Browse files
committed
Format
1 parent da48b70 commit e83a640

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Diff for: sycl/test-e2e/lit.cfg.py

+17-5
Original file line numberDiff line numberDiff line change
@@ -762,27 +762,37 @@ def remove_level_zero_suffix(devices):
762762
# discovered already.
763763
config.sycl_dev_features = {}
764764

765+
765766
# Function to check if multi-device-emulation feature is available
766767
def check_multi_device_emulation(device):
767768
try:
768769
with test_env():
769770
cmd = "{} {}".format(config.run_launcher or "", sycl_ls)
770771
mod_env = os.environ.copy()
771772
mod_env["ONEAPI_DEVICE_SELECTOR"] = device
772-
sp = subprocess.run(cmd, env=mod_env, text=True, shell=True, capture_output=True)
773+
sp = subprocess.run(
774+
cmd, env=mod_env, text=True, shell=True, capture_output=True
775+
)
773776
sp.check_returncode()
774-
regular_device_count = sum(1 for line in sp.stdout.splitlines() if line.startswith("["))
777+
regular_device_count = sum(
778+
1 for line in sp.stdout.splitlines() if line.startswith("[")
779+
)
775780
mod_env["NEOReadDebugKeys"] = "1"
776781
mod_env["CreateMultipleRootDevices"] = str(regular_device_count * 2)
777-
sp = subprocess.run(cmd, env=mod_env, text=True, shell=True, capture_output=True)
782+
sp = subprocess.run(
783+
cmd, env=mod_env, text=True, shell=True, capture_output=True
784+
)
778785
sp.check_returncode()
779-
emulated_device_count = sum(1 for line in sp.stdout.splitlines() if line.startswith("["))
786+
emulated_device_count = sum(
787+
1 for line in sp.stdout.splitlines() if line.startswith("[")
788+
)
780789
if emulated_device_count == regular_device_count * 2:
781790
return True
782791
return False
783792
except Exception as e:
784793
return False
785794

795+
786796
# Version of the driver for a given device. Empty for non-Intel devices.
787797
config.intel_driver_ver = {}
788798
for full_name, sycl_device in zip(
@@ -931,7 +941,9 @@ def check_multi_device_emulation(device):
931941
# Add corresponding target feature
932942
target = config.backend_to_target[be]
933943
features.add(target)
934-
if (sycl_device == "opencl:gpu" or sycl_device == "level_zero:gpu") and check_multi_device_emulation(sycl_device):
944+
if (
945+
sycl_device == "opencl:gpu" or sycl_device == "level_zero:gpu"
946+
) and check_multi_device_emulation(sycl_device):
935947
features.add("multi-device-emulation")
936948

937949
if be == "hip":

0 commit comments

Comments
 (0)