Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4c910d3
fix(codegen): keep the artifact objects of rlibs out of the LTO input
fxeqxmulfx Oct 11, 2026
c64dc69
fix(cargo-oxide): resolve standalone LTO artifact paths
tpn Oct 20, 2026
ea0daf4
feat(cargo-oxide): link external device LTO inputs
tpn Oct 20, 2026
79c0800
Align external LTO example with repository smoke checks
tpn Oct 20, 2026
859f9d8
Carry compiled kernel facts into prepared launches
tpn Oct 20, 2026
fa7f970
Integrate external LTO and compiled launch facts
tpn Oct 20, 2026
a4d1484
Integrate standalone artifact target selection
tpn Oct 20, 2026
3a8b579
Discover and link typed native library operations
tpn Oct 20, 2026
e8c766d
Propagate library resource facts to checked launches
tpn Oct 20, 2026
8c4a42e
Preserve convergence on native device extern declarations
tpn Oct 20, 2026
518f713
Integrate device extern convergence preservation
tpn Oct 20, 2026
4d7d731
Load concrete generic kernels from one native artifact
tpn Oct 20, 2026
e2280ca
Exercise native library calls through ordinary Cargo
tpn Oct 20, 2026
25625e0
Reconcile LTO cleanup after provider integration
tpn Oct 20, 2026
daa45be
Integrate native declaration convergence and CLI cleanup
tpn Oct 20, 2026
4a91388
Integrate reviewed native provider prerequisites
tpn Oct 20, 2026
afeb8b8
Use NVVM debug metadata merge behavior for native LTO
tpn Oct 20, 2026
63d7dc2
Integrate NVVM debug metadata compatibility
tpn Oct 20, 2026
be66267
Check participation and uniform controls for native block calls
tpn Oct 20, 2026
bd361a5
Document native artifact selection and test ambiguous images
tpn Oct 20, 2026
4492cbf
Clarify native library diagnostics and provider transport
tpn Oct 20, 2026
5b12cd9
Integrate native library diagnostics and debug compatibility
tpn Oct 20, 2026
f1b45ba
Integrate native library convergence and diagnostic updates
tpn Oct 20, 2026
8c529ab
Specialize checked helpers for their kernel roots
tpn Oct 20, 2026
a1596e3
Clarify native scratch view restriction
tpn Oct 20, 2026
61c862c
Support cluster queries on targets below sm90
tpn Oct 20, 2026
6790526
Track native library inputs before emitting Cargo dep-info
tpn Oct 20, 2026
0381476
Test cluster query fallback through the MIR pipeline
tpn Oct 20, 2026
dfd32af
Integrate clarified native scratch safety documentation
tpn Oct 20, 2026
3437de9
Integrate generic native loading for checked root qualification
tpn Oct 20, 2026
b90c4dd
Integrate native dependency tracking with generic loading
tpn Oct 20, 2026
333fc8d
Verify cluster query axes and explain target pinning
tpn Oct 20, 2026
dbc2266
Document native freshness limits and render registration examples
tpn Oct 20, 2026
ae683da
Integrate clarified native dependency documentation
tpn Oct 20, 2026
bde905b
Merge existing artifact retention fix into checked helpers
tpn Oct 20, 2026
a5743ff
Track collective carrier origins and full-block reuse
tpn Oct 20, 2026
6f581fc
Correct checked helper facts and rooted device emission
tpn Oct 20, 2026
9b9e99b
Integrate carrier epochs with checked helper corrections
tpn Oct 20, 2026
ccf43cc
Integrate published native input tracking
tpn Oct 20, 2026
656b7a2
Integrate pre-SM90 cluster query behavior
tpn Oct 20, 2026
43bd22a
Retain generic kernel types without host function pointers
tpn Oct 20, 2026
c994898
Reject mutation through aggregate resource descriptors
tpn Oct 20, 2026
5b50992
Integrate generic kernel retention for checked collectives
tpn Oct 20, 2026
2c04c8e
Document and guard the generic kernel anchor identity
tpn Oct 20, 2026
26b427d
fix(oxide): allow proved inhabited value checks
tpn Oct 20, 2026
7cbbbd6
Integrate reviewed generic kernel retention
tpn Oct 20, 2026
be42c33
feat(oxide): accept read-only native library payloads
tpn Oct 20, 2026
b426922
Use the installed LLVM version for the LTO example check
tpn Oct 20, 2026
defd5a6
Refresh carrier diagnostics in launch contract tests
tpn Oct 20, 2026
c28e896
Track enum tags separately from collective payload facts
tpn Oct 20, 2026
3e894ef
Integrate checked collective CI corrections
tpn Oct 20, 2026
090b176
Restrict enum payload facts to variant projections
tpn Oct 20, 2026
344d4c6
Reject structural facts without an enum variant origin
tpn Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions .github/workflows/examples-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,51 @@ jobs:
"${RUNNER_TEMP}/cross-crate-sm90-build.log" \
'^(kernel-lib|cross_crate_kernel)$' kernel-lib cross_crate_kernel

# With LTO, rustc reads bitcode from the Rust objects of each rlib and
# removes these objects from the link. The artifact objects of the
# libraries must not be Rust objects.
- name: LTO keeps the PTX bundles of libraries
timeout-minutes: 15
working-directory: cuda-oxide
env:
CUDA_TOOLKIT_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}
CUDA_OXIDE_LLC: /usr/bin/llc-23
CARGO_TARGET_DIR: ${{ runner.temp }}/examples-shared-target
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_RELEASE_LTO: fat
run: |
set -euo pipefail
sysroot="$(rustc --print sysroot)"
export LIBRARY_PATH="${sysroot}/lib:${LIBRARY_PATH:-}"
export LD_LIBRARY_PATH="${CUDA_TOOLKIT_PATH}/lib64:${sysroot}/lib:${LD_LIBRARY_PATH:-}"

assert_bundles() {
local file="$1"
shift
local section="${RUNNER_TEMP}/$(basename "${file}").oxart"
objcopy --dump-section ".oxart=${section}" "${file}"
local bundle
for bundle in "$@"; do
grep -aFq "${bundle}" "${section}"
done
}
binary="${CARGO_TARGET_DIR}/release/cuda_module_in_lib"

cargo oxide build cuda_module_in_lib --arch sm_86 2>&1 \
| tee "${RUNNER_TEMP}/cross-crate-lto-build.log"
assert_bundles "${binary}" cuda_module_in_lib module-kernels

# If a session writes an rlib and a dynamic library, the system
# linker gets the artifact objects as link arguments.
manifest=crates/rustc-codegen-cuda/examples/cuda_module_in_lib/kernel-lib/Cargo.toml
printf '\n[lib]\ncrate-type = ["rlib", "cdylib"]\n' >> "${manifest}"
cargo oxide build cuda_module_in_lib --arch sm_86 2>&1 \
| tee "${RUNNER_TEMP}/cross-crate-lto-cdylib-build.log"
git checkout -- "${manifest}"
assert_bundles "${binary}" cuda_module_in_lib module-kernels
assert_bundles \
"$(find "${CARGO_TARGET_DIR}/release" -name libmodule_kernels.so)" module-kernels

- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cuda-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cuda-bindings = { version = "=0.4.0", path = "../cuda-bindings" }
cuda-core-derive = { version = "=0.4.0", path = "../cuda-core-derive" }
anyhow = "1"
half = { version = "2" }
oxide-artifacts = { version = "0.2.1", features = ["object-read"] }
oxide-artifacts = { version = "0.2.1", path = "../cuda-oxide/crates/oxide-artifacts", features = ["object-read"] }

[dev-dependencies]
trybuild = "1"
Expand Down
15 changes: 13 additions & 2 deletions cuda-core/src/simt/embedded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,19 @@ impl EmbeddedModule {
pub fn load(&self, ctx: &Arc<CudaContext>) -> Result<Arc<CudaModule>, EmbeddedModuleError> {
let image =
loadable_payload(&self.bundle).expect("EmbeddedModule always has a loadable payload");
ctx.load_module_from_image(image)
.map_err(EmbeddedModuleError::Driver)
ctx.load_module_from_image_with_launch_facts(
image,
self.bundle
.entries
.iter()
.filter_map(|entry| {
entry
.launch_facts
.map(|facts| (entry.symbol.clone(), facts))
})
.collect(),
)
.map_err(EmbeddedModuleError::Driver)
}
}

Expand Down
Loading
Loading