Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 7fd331d

Browse files
committed
update gpu check
Signed-off-by: zhenwei-intel <[email protected]>
1 parent d2f2dd1 commit 7fd331d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

intel_extension_for_transformers/tools/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ def get_gpu_family():
6060
elif 'Arc(TM)' in name:
6161
result = 'arc'
6262
else:
63-
assert False, "Unsupported GPU device: {}".format(name)
63+
print("Warning: Unsupported GPU device: {}".format(name))
64+
result = ""
6465

65-
if result not in supported_gpus():
66-
assert False, "Unsupported GPU device: {}".format(name)
67-
else:
68-
return result
66+
return result
6967

7068
_ipex_available = importlib.util.find_spec("intel_extension_for_pytorch") is not None
7169
_ipex_version = "N/A"

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ def get_gpu_family():
3939
return 'max'
4040
if 'Arc(TM)' in name:
4141
return 'arc'
42-
if '0x7d55' in name or '0x7dd5' in name or '0x7d45' in name:
43-
return 'mtl'
44-
assert False, "Unsupported GPU device: {}".format(name)
45-
42+
# if '0x7d55' in name or '0x7dd5' in name or '0x7d45' in name:
43+
# return 'mtl'
44+
print("Warning: Unsupported GPU device: {}".format(name))
45+
return ""
4646

4747
def check_env_flag(name: str, default: bool = False) -> bool:
4848
if default: # if a flag meant to be true if not set / mal-formatted

0 commit comments

Comments
 (0)