Skip to content

Gather transform groups without a closure for CUDA Oxide - #32

Merged
jcwal1516 merged 1 commit into
mainfrom
fix/cuda-oxide-transform-group
Nov 19, 2026
Merged

jcwal1516 merged 1 commit into
mainfrom
fix/cuda-oxide-transform-group

Conversation

@jcwal1516

Copy link
Copy Markdown
Member

Problem

The CUDA hardware workflow on 393a941, the merge of #31, failed at "Lint all targets and features" while building the CUDA Oxide device kernels. The pinned compiler (nightly-2026-04-03) panics in its device collector:

item_name: no name for DefPath { transform :: transform_group :: {closure} }
  at rustc_codegen_cuda::collector::DeviceCollector::should_collect_from_crate
Error: CUDA Oxide kernel compilation failed

#31 changed jxr_math::transform::transform_group to gather its values with indices.map(|index| coefficients[index]). The kernels reach that function through inverse_core_transform and the overlap operators. 0.5.1 gathered the values by index.

Change

Gather with an indexed loop, the same pattern as the write-back loop that follows it, and add a comment explaining why. This is the only closure #31 added to jxr_math::transform and jxr_math::overlap, the two modules the kernels import. The other closures in jxr-math either existed in 0.5.1, which built on the CUDA runner, or are in encoder-only code.

jxr-math 0.2.1 is not yet published, so the versions in #31 stand.

Checks run (aarch64 macOS, Rust 1.99.0)

  • cargo clippy --workspace --all-targets --all-features -- -D warnings: clean
  • cargo test --workspace --all-features passed 590 with 0 failed and 16 ignored; cargo test -p jxr --no-default-features passed 104 with 0 failed
  • Fuzz encode_roundtrip fixed cases: 5 passed
  • T.834 CPU and Metal: 517 passed, 179 skipped, 0 failed each
  • WebAssembly size gate: within budget; base 407,826 bytes (63 smaller), simd128 429,779 (63 smaller)

Not yet validated

CUDA Oxide is unavailable on macOS, so this machine can't build the kernels. The CUDA hardware workflow only runs on main, so it has to be re-run after this merges, before anything is published.

The CUDA hardware workflow on 393a941 failed to build the device
kernels: CUDA Oxide's pinned compiler panics in its device collector
("item_name: no name for DefPath transform::transform_group::{closure}")
on the closure passed to `<[usize; N]>::map` in transform_group, which
the kernels reach through inverse_core_transform and the overlap
operators. 0.5.1 gathered the four values by index.

Gather with an indexed loop, like the write-back that follows it.
Behaviour is unchanged: workspace tests, the fuzz harness, and the
T.834 CPU and Metal comparisons pass as before.
@jcwal1516
jcwal1516 merged commit 213d769 into main Nov 19, 2026
2 checks passed
@jcwal1516
jcwal1516 deleted the fix/cuda-oxide-transform-group branch November 19, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant