From 69c6aff57a0bc46dfee3aea34031ccf315f35dca Mon Sep 17 00:00:00 2001 From: Abdullah Date: Thu, 14 Nov 2024 20:32:04 +0100 Subject: [PATCH] fix formatting of the python scripts --- .../checkbox-provider-dss/bin/pytorch_can_use_xpu.py | 11 +++++++---- .../bin/tensorflow_can_use_xpu.py | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/pytorch_can_use_xpu.py b/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/pytorch_can_use_xpu.py index 18ac296e6..58894961f 100755 --- a/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/pytorch_can_use_xpu.py +++ b/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/pytorch_can_use_xpu.py @@ -8,8 +8,11 @@ print(ipex.__version__) try: - [print(f"[{i}]: {torch.xpu.get_device_properties(i)}") for i in range(torch.xpu.device_count())]; - sys.exit(0) + [ + print(f"[{i}]: {torch.xpu.get_device_properties(i)}") + for i in range(torch.xpu.device_count()) + ] + sys.exit(0) except Exception: - print("Encountered an error getting XPU device properties", file=sys.stderr) - sys.exit(1) + print("Encountered an error getting XPU device properties", file=sys.stderr) + sys.exit(1) diff --git a/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/tensorflow_can_use_xpu.py b/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/tensorflow_can_use_xpu.py index 668341ea7..552e7bc4f 100755 --- a/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/tensorflow_can_use_xpu.py +++ b/contrib/checkbox-dss-validation/checkbox-provider-dss/bin/tensorflow_can_use_xpu.py @@ -8,8 +8,8 @@ devices = tf.config.experimental.list_physical_devices() xpu_found = False for device_str in devices: - if "XPU" in device_str: - xpu_found = True - break + if "XPU" in device_str: + xpu_found = True + break assert xpu_found, "XPU not found"