Reinstall buck2 arm64 binary on MacOS if the wrong version (x86) is installed (#129)
Summary: This fixes the flaky linking issue on MacOS where the x86 version of `libtorch.dylib` instead of the correct arm64 version. The root cause turns out to be buck2 binary itself where its x86 version was wrongly installed on some runners (probably my fault when adding macos support). With the current logic, buck2 is installed only once when the binary isn't there, so when a wrong version sneaks in, it stays and causes troubles for all future jobs. The fix here is to check for the arch of the binary to ensure that we have the correct 64-bit arm64 buck2 installed. Pull Request resolved: https://github.com/pytorch/executorch/pull/129 Test Plan: Confirm with a case where buck2 (x86) was reinstalled with the correct arch (arm64) https://github.com/pytorch/executorch/actions/runs/5970665911/job/16198657346#step:9:56 Reviewed By: larryliu0820 Differential Revision: D48670950 Pulled By: huydhn fbshipit-source-id: dc8ddbeab7d07d525a7671b97d478b342f957dcd
H
Huy Do committed
036b933e711f42703ac2d2689ed25bc7435d7f8e
Parent: 1c92891
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 8/25/2023, 2:12:32 AM