Skip to content

Conversation

@karolzwolak
Copy link
Member

@karolzwolak karolzwolak commented Jan 23, 2026

The target name is a bit weird but it will allow offloading rust code on intel GPUs.
Tracking issue #131513
Builds upon #150851 (commits from that are included here for now), needs this merged upstream llvm/llvm-project#174675 to be actually usable.
This is work in progress, but any feedback is appreciated.
The modified tests pass on my setup but I haven't been able to run any code on the GPU yet.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 23, 2026
@karolzwolak karolzwolak added F-gpu_offload `#![feature(gpu_offload)]` and removed A-testsuite Area: The testsuite used to check the correctness of rustc A-CI Area: Our Github Actions CI A-tidy Area: The tidy tool 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 23, 2026
@ZuseZ4 ZuseZ4 mentioned this pull request Jan 23, 2026
5 tasks
Copy link
Member Author

@karolzwolak karolzwolak Jan 23, 2026

Choose a reason for hiding this comment

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

Will have to verify stuff in here, for now I just copied from the vulkan triple and changed the data layout.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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. labels Jan 23, 2026
@rust-log-analyzer

This comment has been minimized.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Jan 23, 2026

Great. For the runtime failure, I think I know a fix. Other than that, can you please update the rustc-dev-guide (you can do that in this PR) and add a spirv section under the offload chapter? #149202 has an exmample. It seems like for now users will have to call out to some extra binaries to process the artifacts, until LLVM get's to integrate them properly. See e.g https://github.com/llvm/llvm-project/pull/174675/changes#r2713489339, so it would be good to document the spirv pipeline.

Arch::Msp430 => ArchKind::Msp430,
Arch::Nvptx64 => ArchKind::Nvptx,
Arch::RiscV32 | Arch::RiscV64 => ArchKind::Riscv,
Arch::SpirV => ArchKind::Spirv,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not entirely sure I agree with SPIRV being SpirV in the Arch but let's be consistent here. The ArchKind::Riscv deviation was not an intentional choice, if memory serves.

Suggested change
Arch::SpirV => ArchKind::Spirv,
Arch::SpirV => ArchKind::SpirV,

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd go with Spirv everywhere then. But that'd have to be fixed in the "upstream" PR as well.


// Checks (via an assert in `compiler/rustc_ty_utils/src/abi.rs`) that the C ABI for the current
// target correctly implements `rustc_pass_indirectly_in_non_rustic_abis`.
#[cfg(not(target_arch = "spirv"))]
Copy link
Member

Choose a reason for hiding this comment

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

I should comment on the "upstream" PR because this is present from there.

Copy link
Member Author

Choose a reason for hiding this comment

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

btw support for variadics in spirv functions landed recently llvm/llvm-project#175076

@rust-bors

This comment has been minimized.

@karolzwolak
Copy link
Member Author

It seems like for now users will have to call out to some extra binaries to process the artifacts, until LLVM get's to integrate them properly. See e.g https://github.com/llvm/llvm-project/pull/174675/changes#r2713489339, so it would be good to document the spirv pipeline.

Good catch, that's where I was stuck. But that's only a problem when we're using lto I think. Why does offloading require fat lto?

@karolzwolak karolzwolak force-pushed the spirv64-intel-unknown-target branch from fb06f5e to 6e7fb35 Compare January 24, 2026 19:00
@rust-log-analyzer

This comment has been minimized.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Jan 24, 2026

Mostly what Johannes said in the LLVM PR, we rely on LTO for performance, although it also simplifies the implementation a bit, since we only have one llvm-ir module, so we don't have to search for functions across multiple modules. There were two groups working on getting thin-lto performance competitive, I can ask around how that's going. In the future we could look into supporting other things than fat-lto, but so far I just didn't want to spend time on features that reduce runtime perf, if we don't even have everything needed yet to write performant kernels.

@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Jan 24, 2026
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-6.rs ... ok
test [ui] tests/ui/imports/ambiguous-4.rs ... ok
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
---
test [ui] tests/ui/zero-sized/zero-sized-btreemap-insert.rs ... ok

failures:

---- [ui] tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs#AMDGPU stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU/feature-gate-abi_gpu_kernel.AMDGPU.stderr`
diff of stderr:

1 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:17:8
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:19:8
3    |
4 LL | extern "gpu-kernel" fn f1(_: ()) {}
5    |        ^^^^^^^^^^^^

9    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10 
11 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:22:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
13    |
14 LL |     extern "gpu-kernel" fn m1(_: ());
15    |            ^^^^^^^^^^^^

19    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20 
21 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:25:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:27:12
23    |
24 LL |     extern "gpu-kernel" fn dm1(_: ()) {}
25    |            ^^^^^^^^^^^^

29    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
30 
31 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:33:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:35:12
33    |
34 LL |     extern "gpu-kernel" fn m1(_: ()) {}
35    |            ^^^^^^^^^^^^

39    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
40 
41 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:39:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:41:12
43    |
44 LL |     extern "gpu-kernel" fn im1(_: ()) {}
45    |            ^^^^^^^^^^^^

49    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
50 
51 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:44:18
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:46:18
53    |
54 LL | type A1 = extern "gpu-kernel" fn(_: ());
55    |                  ^^^^^^^^^^^^

59    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
60 
61 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:48:8
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:50:8
63    |
64 LL | extern "gpu-kernel" {}
65    |        ^^^^^^^^^^^^

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:19:8
-   --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:24:12
---
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args feature-gates/feature-gate-abi_gpu_kernel.rs`

error in revision `AMDGPU`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "amdgpu" "--check-cfg" "cfg(test,FALSE,host,amdgpu,nvptx,spirv)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--crate-type=rlib" "--target" "amdgcn-amd-amdhsa" "-Ctarget-cpu=gfx1100" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.AMDGPU/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:19:8
   |
LL | extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |        ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:24:12
   |
LL |     extern "gpu-kernel" fn m1(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:27:12
   |
LL |     extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:35:12
   |
LL |     extern "gpu-kernel" fn m1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:41:12
   |
LL |     extern "gpu-kernel" fn im1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:46:18
   |
LL | type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |                  ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:50:8
   |
LL | extern "gpu-kernel" {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |        ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

---- [ui] tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs#AMDGPU stdout end ----
---- [ui] tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs#SPIRV stdout ----

error in revision `SPIRV`: auxiliary build of /checkout/tests/auxiliary/minicore.rs failed to compile: 
status: exit status: 1
command: "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/auxiliary/minicore.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "spirv" "--check-cfg" "cfg(test,FALSE,host,amdgpu,nvptx,spirv)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.SPIRV/libminicore.rlib" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--crate-type=rlib" "--target" "spirv64-intel-unknown" "--crate-type" "rlib" "-Cpanic=abort"
stdout: none
--- stderr -------------------------------
warning: type `c_void` should have an upper camel case name
##[warning]  --> /checkout/tests/auxiliary/minicore.rs:286:10
   |
LL | pub enum c_void {
   |          ^^^^^^ help: convert the identifier to upper camel case: `CVoid`
   |
   = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default

warning: variant `__variant1` should have an upper camel case name
##[warning]  --> /checkout/tests/auxiliary/minicore.rs:287:5
   |
LL |     __variant1,
   |     ^^^^^^^^^^ help: convert the identifier to upper camel case: `Variant1`

warning: variant `__variant2` should have an upper camel case name
##[warning]  --> /checkout/tests/auxiliary/minicore.rs:288:5
   |
LL |     __variant2,
   |     ^^^^^^^^^^ help: convert the identifier to upper camel case: `Variant2`

error: data-layout for target `spirv64-intel-unknown`, `e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1-P9-A0`, differs from LLVM target's `spirv64-intel-unknown` default layout, `e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1`

error: aborting due to 1 previous error; 3 warnings emitted
------------------------------------------

---- [ui] tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs#SPIRV stdout end ----
---- [ui] tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs#NVPTX stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX/feature-gate-abi_gpu_kernel.NVPTX.stderr`
diff of stderr:

1 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:17:8
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:19:8
3    |
4 LL | extern "gpu-kernel" fn f1(_: ()) {}
5    |        ^^^^^^^^^^^^

9    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10 
11 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:22:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:24:12
13    |
14 LL |     extern "gpu-kernel" fn m1(_: ());
15    |            ^^^^^^^^^^^^

19    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20 
21 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:25:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:27:12
23    |
24 LL |     extern "gpu-kernel" fn dm1(_: ()) {}
25    |            ^^^^^^^^^^^^

29    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
30 
31 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:33:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:35:12
33    |
34 LL |     extern "gpu-kernel" fn m1(_: ()) {}
35    |            ^^^^^^^^^^^^

39    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
40 
41 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:39:12
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:41:12
43    |
44 LL |     extern "gpu-kernel" fn im1(_: ()) {}
45    |            ^^^^^^^^^^^^

49    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
50 
51 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:44:18
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:46:18
53    |
54 LL | type A1 = extern "gpu-kernel" fn(_: ());
55    |                  ^^^^^^^^^^^^

59    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
60 
61 error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
-   --> $DIR/feature-gate-abi_gpu_kernel.rs:48:8
+   --> $DIR/feature-gate-abi_gpu_kernel.rs:50:8
63    |
64 LL | extern "gpu-kernel" {}
65    |        ^^^^^^^^^^^^

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:19:8
-   --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:24:12
---
The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args feature-gates/feature-gate-abi_gpu_kernel.rs`

error in revision `NVPTX`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "nvptx" "--check-cfg" "cfg(test,FALSE,host,amdgpu,nvptx,spirv)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--crate-type=rlib" "--target" "nvptx64-nvidia-cuda" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/feature-gates/feature-gate-abi_gpu_kernel.NVPTX/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:19:8
   |
LL | extern "gpu-kernel" fn f1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |        ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:24:12
   |
LL |     extern "gpu-kernel" fn m1(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:27:12
   |
LL |     extern "gpu-kernel" fn dm1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:35:12
   |
LL |     extern "gpu-kernel" fn m1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:41:12
   |
LL |     extern "gpu-kernel" fn im1(_: ()) {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |            ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:46:18
   |
LL | type A1 = extern "gpu-kernel" fn(_: ()); //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |                  ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the extern "gpu-kernel" ABI is experimental and subject to change
##[error]  --> /checkout/tests/ui/feature-gates/feature-gate-abi_gpu_kernel.rs:50:8
   |
LL | extern "gpu-kernel" {} //~ ERROR "gpu-kernel" ABI is experimental and subject to change
   |        ^^^^^^^^^^^^
   |
   = note: see issue #135467 <https://github.com/rust-lang/rust/issues/135467> for more information
   = help: add `#![feature(abi_gpu_kernel)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 25, 2026

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

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-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool F-gpu_offload `#![feature(gpu_offload)]` 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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