You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d66a2a3
Browse filesBrowse the repository at this point in the historyBrowse files
[ExecuTorch][WebGPU] Fix CI: link shared wgpu-native to avoid LTO bitcode clash
Pull Request resolved: pytorch#20036
The "Test WebGPU Backend" CI job fails on every PR while building the editable executorch wheel. The pybind _portable_lib thin-LTO link aborts with `LLVM gold plugin has failed to create LTO module: Invalid value (Producer: 'LLVM21.1.3-rust-1.92.0-stable' Reader: 'LLVM 12.0.1')`.
Root cause: with `-DEXECUTORCH_BUILD_WEBGPU=ON` the backend static-links the prebuilt Rust `libwgpu_native.a`, whose objects embed LLVM-21 `.llvmbc` bitcode (377 of 487 archive members), into the thin-LTO'd pybind extension that pybind11 builds with the CI image's clang-12. LLVM-12's gold plugin cannot parse LLVM-21 bitcode, so the link fails before any test runs.
Fix: link the prebuilt shared `libwgpu_native.so` (already downloaded by `setup-wgpu-native.sh`) instead of the static `.a`. The `.so` carries no `.llvmbc`, so no foreign bitcode enters the LTO link. This mirrors how the QNN/CoreML/OpenVINO backends consume prebuilt native deps (shared, runtime-loaded) rather than static-linking foreign objects. Also flips the setup-script idempotency check to the `.so`.
Authored with Claude Code.
ghstack-source-id: 390126987
@exported-using-ghexport
Differential Revision: [D107539304](https://our.internmc.facebook.com/intern/diff/D107539304/)
0 commit comments