Skip to content

Commit 9686c79

Browse files
mikekgfbJack-Khuu
andauthored
Force run-readme-pr-macos.yml to use CPU instead of incorrectly loading to MPS (#1417)
* bandaid for run-readme-pr-macos.yml incorrectly loading to MPS as per #1416 torchchat on hosts without MPS (which is all github hosts which use kvm to virtualize MacOS, but not MPS) should choose CPU as "fast" device. The logic is present (see discussion in #1416 ), but either not fully functional (that would be the easier one to fix, just print the result of get_device_str and fix the code!) or specifically ignored on load in torch/serialization.py (If this is the case, we're effectively looking at a core PyTorch issue....) In the meantime, this bandaid just forces the use of CPU on MacOS tests, to make MacOS tests run on CPU -- labeit hsortcircuiting test/execution of the "fast" device logic. Not ideal, but some testing beats no testing. * Update run-readme-pr-macos.yml Add informational message to MacOS CPU tests * Update build_native.sh Update to C++11 ABI for AOTI, similar to ET --------- Co-authored-by: Jack-Khuu <jack.khuu.7@gmail.com>
1 parent 24fd441 commit 9686c79

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/run-readme-pr-macos.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
sysctl machdep.cpu.core_count
3434
echo "::endgroup::"
3535
36-
.ci/scripts/run-docs readme
36+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
37+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs readme
3738
3839
echo "::group::Completion"
3940
echo "tests complete"
@@ -68,7 +69,8 @@ jobs:
6869
sysctl machdep.cpu.core_count
6970
echo "::endgroup::"
7071
71-
.ci/scripts/run-docs quantization
72+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
73+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs quantization
7274
7375
echo "::group::Completion"
7476
echo "tests complete"
@@ -103,7 +105,8 @@ jobs:
103105
sysctl machdep.cpu.core_count
104106
echo "::endgroup::"
105107
106-
.ci/scripts/run-docs gguf
108+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
109+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs gguf
107110
108111
echo "::group::Completion"
109112
echo "tests complete"
@@ -137,7 +140,8 @@ jobs:
137140
sysctl machdep.cpu.core_count
138141
echo "::endgroup::"
139142
140-
.ci/scripts/run-docs advanced
143+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
144+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs advanced
141145
142146
echo "::group::Completion"
143147
echo "tests complete"

0 commit comments

Comments
 (0)