dlopen offload - #160335
Conversation
|
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
1bb876b to
3eee4fe
Compare
This comment has been minimized.
This comment has been minimized.
| impl KernelArgsTy { | ||
| const OFFLOAD_VERSION: u64 = 3; | ||
| const FLAGS: u64 = 0; | ||
| const FLAGS: u64 = 1 << 6; // Enable StrictBlocksAndThreads |
There was a problem hiding this comment.
There was a problem hiding this comment.
cc @kevinsala
@Sa4dUs I vaguely remember you ran into this when trying LLVM 23 patches, right? Was this the right solution?
There was a problem hiding this comment.
I'll double-check with Kevin later today and test it myself, otherwise lgtm
94f5d55 to
48ede5a
Compare
This comment has been minimized.
This comment has been minimized.
|
The LLVM 23 update unfortunately takes a little longer than expected, but glad to hear you got it to work with both 22 and 23. In that case I'd just merge it once it's ready and not wait, since it seems unlikely that we'll break the LLVM 23 update PR with this work here. Worst case, It's a bit unfortunate that we need a new cmake file for the offload wrapper. Hopefully I'll find time to upstream our wrappers into LLVM, so we won't need that in the future. But it would probably be part of llvm 24, so we shouldn't wait for that. |
This comment has been minimized.
This comment has been minimized.
48ede5a to
f88156c
Compare
This comment has been minimized.
This comment has been minimized.
23e95c8 to
7bf37c4
Compare
7bf37c4 to
81f223e
Compare
|
Update to LLVM23 PR has been merged. I pull-rebased onto the latest main and will recheck the offload build on UofT server |
|
I tested that it works against LLVM23 again |
|
|
||
| fn get_rust_offload_path( | ||
| sysroot: &rustc_session::config::Sysroot, | ||
| ) -> Result<String, RustOffloadLibraryError> { |
There was a problem hiding this comment.
That should probably be a PathBuf or an OSString or something like that, or?
https://docs.rs/libloading/latest/libloading/struct.Library.html
I don't think we need to force a normal String here
|
@bors delegate |
|
@bors squash msg="dlopen Offload" |
This comment has been minimized.
This comment has been minimized.
|
🔨 3 commits were squashed into 162cba5. |
81f223e to
162cba5
Compare
|
@bors r+ rollup |
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
Rollup of 14 pull requests Successful merges: - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160634 (miri subtree update) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160504 (cleanup borrowck, improve c-variadic handling) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160636 (derive(Diagnostic): link to proper docs)
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
…uwer Rollup of 21 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160634 (miri subtree update) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls) - #160649 (move naked function ui tests)
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
…uwer Rollup of 20 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160634 (miri subtree update) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls)
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
dlopen offload dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang#159064 (comment)) I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to rust-lang#158734 temporarily), though It might be better to land this after LLVM 23. r? @ZuseZ4
…uwer Rollup of 28 pull requests Successful merges: - #159784 (Hint that memchr returns an in-bounds index) - #160673 (Improve `canonical_param_env_cache`) - #150885 (Revive L4Re target) - #159643 (Add support for splatted function pointers) - #160433 (delegation: add support for wrapping of the return value with `From::from`) - #160530 (refactor handling of target features in Session) - #160606 (bootstrap: Store and use an explicit CheckKind in `check::Rustc`) - #160628 (fix ICE in `suggest_add_reference_to_arg` for non-callable items) - #160683 (Add regression test for unknown feaeture name reported with other errors) - #157641 (Do not promote extern statics) - #158904 (Fix FutureDropPoll shim for by-move async closures) - #159816 (added note/help about iterator invalidation when mutating a collection inside a for loop) - #160103 (Add regression test for GAT bound mismatched type error) - #160335 (dlopen offload) - #160445 (codegen: classify localized MSVC linker progress as linker_info) - #160499 (rustc_resolve: move diagnostic attribute linting to attr parsing) - #160504 (cleanup borrowck, improve c-variadic handling) - #160577 (expand: Feature gate AST-based attribute macros on expressions and statements) - #160587 (Add regression test for associated type outlives bound at call site) - #160625 (platform-support/netbsd.md: No longer mention 8.x, due to EoL.) - #160633 (delegation: fix determining wrong `FnKind` when delegation is inside const arg) - #160636 (derive(Diagnostic): link to proper docs) - #160644 (Clean up some manual debug impls) - #160649 (move naked function ui tests) - #160672 (Improve `MaybeLiveLocals`) - #160693 (Add branch config for perf. unrolling in bors) - #160696 (rustc_codegen_llvm: handle sm_101* features being an alias) - #160706 (renovate: clarify that vulnerability PRs are opened automatically)



View all comments
dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (#159064 (comment))
I tested that this works by following steps at https://rustc-dev-guide.rust-lang.org/offload/usage.html for both LLVM22 and 23(by switch base branch to #158734 temporarily), though It might be better to land this after LLVM 23.
r? @ZuseZ4