Skip to content

Add offload support to the dist-x86_64-linux CI job - #159064

Draft
sgasho wants to merge 6 commits into
rust-lang:mainfrom
sgasho:offload-dist
Draft

Add offload support to the dist-x86_64-linux CI job#159064
sgasho wants to merge 6 commits into
rust-lang:mainfrom
sgasho:offload-dist

Conversation

@sgasho

@sgasho sgasho commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

View all comments

Add offload support to the dist-x86_64-linux CI job
This enables users to compile offload code without building rustc from source

  • Package the offload runtime shared libraries
  • Package the AMDGPU and NVPTX device runtime libraries

I checked the tarballs work by compiling & running the sample offload code here:
https://rustc-dev-guide.rust-lang.org/offload/usage.html

Before After
スクリーンショット 2026-07-16 23 46 46 スクリーンショット 2026-07-16 23 49 32
スクリーンショット 2026-07-16 23 48 31 スクリーンショット 2026-07-16 23 50 27

There are two changes affect outside of offload (I left github comments on the relevant sections). So,

r? @Kobzol
r? @jieyouxu
r? @ZuseZ4

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 10, 2026
@Kobzol

Kobzol commented Jul 10, 2026

Copy link
Copy Markdown
Member

@bors delegate try

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

✌️ @sgasho, you can now perform try builds on this pull request!

You can now post @bors try to start a try build.

@sgasho

sgasho commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

rust-bors Bot pushed a commit that referenced this pull request Jul 10, 2026
Build offload in dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: bb4478e (bb4478e7edac7d0a86c29a3ac65f56cfa1d81a72)
Base parent: 3ead112 (3ead112e67f8feb4d6b09e12f1b5d83b87698961)

@sgasho

sgasho commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 12, 2026
Build offload in dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

rust-bors Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 7b815a7 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 13, 2026
@sgasho

sgasho commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Build offload in dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 9872f3c (9872f3c6d16727671e9f43962be4e12c30bdf321)
Base parent: 5503df8 (5503df87342a73d0c29126a7e08dc9c1255c46ad)

@sgasho

sgasho commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
Build offload in dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 64ca999 (64ca999aa0681333d35e35b02d81c33fa85b0e97)
Base parent: df1ae0f (df1ae0f7dd168513de2d89beb2cb7a95d4fdc118)

@sgasho sgasho changed the title Build offload in dist-x86_64-linux CI job Add offload support to the dist-x86_64-linux CI job Jul 16, 2026
@rustbot

rustbot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@sgasho
sgasho marked this pull request as ready for review July 16, 2026 16:23
@sgasho

sgasho commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 23, 2026
Add offload support to the dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@sgasho

sgasho commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

I had started working on a PR that teaches rustc how to directly call the LLVM apis which the linker wrapper is also using

this PR?: #149827
Continuing this work might be something I can look into after GSoC

@rust-bors

rust-bors Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0dc28a1 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

The GCC mirror now needs TLS 1.3.
@sgasho

sgasho commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 24, 2026
Add offload support to the dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

rust-bors Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e3aafc7 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@sgasho

sgasho commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 24, 2026
Add offload support to the dist-x86_64-linux CI job


try-job: dist-x86_64-linux
@rust-bors

rust-bors Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 3236637 (323663757ee45dbad650ca9e228c4107aca5288b)
Base parent: 29e68fe (29e68fe2295f8fc2feb52b8cb0b61a055842fdcf)

@sgasho

sgasho commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Ah, I almost forgot about this effect of not using llvm.offload=true
I'll create and open dlopen Offload(this approach is the most appropriate?) PR first.

スクリーンショット 2026-07-26 12 53 31 スクリーンショット 2026-07-26 12 53 39

@ZuseZ4

ZuseZ4 commented Jul 27, 2026

Copy link
Copy Markdown
Member

Yeah, hopefully it is easier to get to work for offload since we have no typetrees and generally a lot less functions which should require offload.

I don't fully remember if you'll only need both of libomptarget and libomp or just one, but just go with whatever works. Also remember to build your PR on the llvm23 commit, since that should land in a day (famous last words).
I asked around for an Offload changelog to see if anything in there should affect your PR.

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #160284) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

@sgasho sgasho mentioned this pull request Aug 1, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 7, 2026
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
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 7, 2026
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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 7, 2026
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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 7, 2026
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
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 7, 2026
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
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 7, 2026
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
rust-timer added a commit that referenced this pull request Aug 8, 2026
Rollup merge of #160335 - sgasho:dlopen_offload, r=ZuseZ4

dlopen offload

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
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 8, 2026
dlopen offload

dlopen offload to dist it in dist-x86_64-linux without enabling llvm.offload=true in CI (rust-lang/rust#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/rust#158734 temporarily), though It might be better to land this after LLVM 23.

r? @ZuseZ4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants