Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/ci/docker/host-x86_64/optional-x86_64-gnu-offload/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
ninja-build \
file \
curl \
ca-certificates \
python3 \
git \
cmake \
pkg-config \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV NO_DOWNLOAD_CI_LLVM 1
ENV CODEGEN_BACKENDS llvm

ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-clang \
--enable-lld \
--enable-llvm-offload \
--enable-llvm-link-shared \
--enable-ninja \
--enable-option-checking \
--disable-docs \
--set llvm.download-ci-llvm=false

ENV SCRIPT="../x.py test --stage 2 --no-fail-fast \
tests/codegen-llvm/gpu_offload"
5 changes: 5 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ auto:
doc_url: https://rustc-dev-guide.rust-lang.org/tests/autodiff-ci-job.html
<<: *job-linux-4c

- name: optional-x86_64-gnu-offload
continue_on_error: true
doc_url: https://rustc-dev-guide.rust-lang.org/tests/offload-ci-job.html
<<: *job-linux-4c

####################
# macOS Builders #
####################
Expand Down
1 change: 1 addition & 0 deletions src/doc/rustc-dev-guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- [GCC codegen backend](./tests/codegen-backend-tests/cg_gcc.md)
- [Performance testing](./tests/perf.md)
- [Autodiff CI job](./tests/autodiff-ci-job.md)
- [Offload CI job](./tests/offload-ci-job.md)
- [Pre-stabilization CI job for the next solver and polonius alpha](./tests/x86_64-gnu-next-trait-solver-polonius-ci-job.md)
- [Standard library semver breakage test](./tests/stdlib-semver-check.md)
- [Misc info](./tests/misc.md)
Expand Down
42 changes: 42 additions & 0 deletions src/doc/rustc-dev-guide/src/tests/offload-ci-job.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Offload CI job

The [`optional-x86_64-gnu-offload`] job provides continuous test coverage for
the experimental `offload` feature.
It is an optional [auto job](./ci.md#auto-builds), so a failure does not prevent a
pull request from being merged.

For more context about the feature, see the [offload tracking issue] and the
[offload internals](../offload/internals.md) chapter.

## What is tested

The job checks:

- host-side LLVM IR generation;
- device-side LLVM IR generation for AMDGPU and NVPTX targets;
- argument lowering in host and device code;

## Running the job

To run the job in a try build, comment on a pull request:

```text
@bors try jobs=optional-x86_64-gnu-offload
```

To run the job locally, run this command from a Rust checkout:

```console
$ cargo run --manifest-path src/ci/citool/Cargo.toml run-local optional-x86_64-gnu-offload
```

See [Testing with Docker](./docker.md) for more information about running CI jobs locally.

## Point of contact

@sgasho sgasho Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't added guidance to ping the gpu-target group https://github.com/rust-lang/team/blob/main/teams/gpu-target.toml for now, because notifying the whole group about every offload test failure seems too broad.

for context: #157776 (comment)

View changes since the review


If you have questions or need help with a failure in this job, open a new topic
in the [offload Zulip channel].

[offload Zulip channel]: https://rust-lang.zulipchat.com/#narrow/channel/422870-t-compiler.2Fgpgpu-backend
[offload tracking issue]: https://github.com/rust-lang/rust/issues/131513
[`optional-x86_64-gnu-offload`]: https://github.com/rust-lang/rust/blob/HEAD/src/ci/github-actions/jobs.yml
Loading