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

Commit aaee454

Browse files
committed
attempt to deal with missing Linux-only os.sched_getaffinity for macos too
Signed-off-by: Luke Nezda <[email protected]>
1 parent beb027b commit aaee454

File tree

1 file changed

+1
-1
lines changed
  • intel_extension_for_transformers/llm/runtime/graph

1 file changed

+1
-1
lines changed

intel_extension_for_transformers/llm/runtime/graph/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def init_from_bin(self, model_type, model_path, **generate_kwargs):
134134
import platform
135135
sys_platform = platform.platform().lower()
136136
if threads is None:
137-
if "windows" in sys_platform:
137+
if "windows" in sys_platform or "macos" in sys_platform:
138138
cpu_count = os.cpu_count()
139139
generate_kwargs["threads"] = int(cpu_count)
140140
else:

0 commit comments

Comments
 (0)