Files
rust/library/core/src
Stuart Cook 2b150f2c65 Rollup merge of #147936 - Sa4dUs:offload-intrinsic, r=ZuseZ4
Offload intrinsic

This PR implements the minimal mechanisms required to run a small subset of arbitrary offload kernels without relying on hardcoded names or metadata.

- `offload(kernel, (..args))`: an intrinsic that generates the necessary host-side LLVM-IR code.
- `rustc_offload_kernel`: a builtin attribute that marks device kernels to be handled appropriately.

Example usage (pseudocode):
```rust
fn kernel(x: *mut [f64; 128]) {
    core::intrinsics::offload(kernel_1, (x,))
}

#[cfg(target_os = "linux")]
extern "C" {
    pub fn kernel_1(array_b: *mut [f64; 128]);
}

#[cfg(not(target_os = "linux"))]
#[rustc_offload_kernel]
extern "gpu-kernel" fn kernel_1(x: *mut [f64; 128]) {
    unsafe { (*x)[0] = 21.0 };
}
```
2025-11-26 23:32:03 +11:00
..
2025-09-01 21:38:26 -04:00
2025-11-25 15:16:43 +08:00
2025-11-14 18:23:19 +03:00
2025-09-12 12:39:31 +03:00
2025-11-25 20:06:30 +01:00
2025-11-20 15:08:11 +04:00
2025-09-01 21:38:26 -04:00
2025-05-12 15:33:30 +02:00
2025-10-20 12:20:15 -06:00
2025-09-07 21:16:35 -07:00
2024-06-11 15:47:00 +02:00
2025-06-15 22:08:41 +02:00
2025-11-02 17:29:08 +01:00
2025-11-12 14:33:41 +01:00
2025-10-05 17:45:27 +00:00
2025-11-09 04:17:15 +07:00
2025-11-06 18:08:29 +01:00