Conversation
33a0a7c to
27e87b3
Compare
B300 validation (NVIDIA B300 SXM6, sm_103) — full test run + kernel benchmarksFix in this revisionThe cuTile Full test suite (B300)
Kernel performance — triton vs cuTile vs cuTeDSL (fwd+bwd, bf16, median ms)Shapes: T=8192, H=4096 (cross_entropy/kl_div/jsd T=4096, V=128256/32000).
Notes: cuTeDSL is fastest on 6/10 (norms/softmax/kl_div/jsd, up to ~28–38% vs triton); cuTile wins the GLU activations; triton stays ahead on rope & cross_entropy. |
… RoPE, FusedAddRMSNorm Adds cuTile dispatcher adapters (impl_name=nvidia-cutile) forwarding to the existing ops/cutile/ops/* kernels, extending linkedin#1420 to broader cuTile coverage. Registrations added to functional.py (union, no dup keys). The SM90-only cuTile fused_linear_cross_entropy adapter is intentionally NOT included here: its kernel requires Hopper cc==(9,0) and is BF16/contiguous/ mean-or-sum-only, which does not fit the generic cross-backend FLCE test matrix (FP16/FP32/bias) — deferred to a dedicated follow-up with proper test integration. Testing (B300 sm_103): test/cutile + test/ops + test/backends -> 472 passed / 0 failed. ruff clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
27e87b3 to
0bd28ea
Compare
Review response (GPT-6 Astra audit) + B300 re-validationAddressed the two Hopper-CI-blocking issues this PR owned:
Re-validated on B300 (sm_103): Pre-existing OSS kernel edge cases flagged by the audit (in |
Kernel benchmarks — NVIDIA B300 SXM6 (sm_103), bf16, median of 30 (warmup 10)forward (ms — lower is better)
forward+backward (ms — lower is better)
Notes: cuTeDSL leads most norms/softmax/jsd and is strong on large kl_div; cuTile wins RoPE forward ~2-4x (but its RoPE backward is costly, so triton/cuTeDSL lead RoPE fwd+bwd); triton stays best for cross_entropy. cuTile ran without num_worker_warps tuning (pod tileiras 13.2 < required 13.3). cuTeDSL auto-falls back to triton above its fwd vocab limit (32768) for kl_div/CE-family at V=128256. |
|
Measurement qualification: the previously posted timing tables are exploratory, not a promotion-quality comparison. Earlier GPU tests and timing jobs were launched concurrently; the harness also did not consistently reset input/gradient state or reject internal fallback. Please do not use those tables to claim a native DSL speedup or choose new defaults. A controlled rerun is in progress with exclusive GPU execution, pinned source/toolchain, PyTorch-reference forward/backward checks, strict fallback attribution, restored input/gradient buffers and five randomized-order repetitions. Unsupported regions will be labeled explicitly. The cuTile CE softcap-padding and non-contiguous SwiGLU findings remain open until their regression fixes are GPU-validated. |
Extracted from the reviewed, B300-gated correctness candidate. This commit contains only this publication scope; broader experimental changes remain private. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Experimental: combine count/min/max metadata into one device-to-host transfer while preserving bounds assertions, ignored targets and weighted normalization. Keep all range validation. Requires B300 correctness and repeated A/B gates before promotion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Confirmed B300 native cuTile CE improvementBaseline: Hardware: NVIDIA B300 (sm_103), PyTorch 2.13.0+cu130, cuda-tile 1.5.0. These are eager full-operator measurements, not model end-to-end speedups.
Method and gates
The measured saving comes from combining the count/min/max validation metadata into one device-to-host transfer. No validation was removed. Older broad DSL timing tables remain exploratory; this qualified comparison is specifically native cuTile CE before/after. |
Materialize zero-stride inputs and reduction gradients before in-place rotation, and preserve each output dtype. Strengthen native, dispatcher and transformer regressions for RoPE, cross entropy and strided SwiGLU. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Guard native CE, fused-add RMSNorm, GeGLU, KLDiv, RoPE and SwiGLU launches on the input CUDA device. Include fused-add autotuning in the guard. Add native/dispatcher nondefault-stream witnesses and hardware-gated non-current-device regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Subclass the real context instead of replacing it with a function, preserving PyTorch device type checks while observing guard entry and exit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Environment selection intentionally precedes the global backend pin. Clear higher-priority variables for this pin-specific test and restore the previous pin; preserve the exact equality assertion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
This extends:
#1420
Testing Done
Exact revision
1abc899e4d38bf769d9e3be88c788761cecadb61: 840 passed, 0 failed, 20 skipped on an exclusively leased NVIDIA B300, compute capability 10.3; PyTorch 2.13.0+cu130, Triton 3.7.1, cuda-tile 1.5.0.The 20 skips are explicitly gated non-current-device cases requiring two CUDA GPUs. Physical multi-GPU execution remains unqualified. The 38 passing single-B300 device/stream witnesses observe guard entry, input-device stream selection, and real native kernel execution on a nondefault stream; outputs and gradients are compared with PyTorch references. They are not presented as physical cross-device tests.
Regression evidence:
3759be61bdff9a14c7adb1a8c27d06484a7f952awith missing-input-device-guard assertions, and pass after the fix.LIGER_KERNEL_IMPL=cutileis set. Dispatch correctly gives environment selection precedence over the programmatic pin; the corrected pin-specific test clears those overrides locally without changing dispatcher behavior or loosening equality.01392c2e821f80e756f8a539bf54f9b2e05b37b9yielded 24 actual value/dtype failures and 24 controls.Changed-file Ruff lint and formatting pass. The compiler's ignored worker-warp-hint warnings remain visible.
The historical native CE operator-latency comparison is retained here:
#1456 (comment)
That measurement predates the new device-guard host code. Performance has not been requalified for this latest revision; no model end-to-end or general-DSL speedup is claimed.
make test(targeted suites above were run)make checkstyle(changed-file Ruff checks were run)make test-convergenceNo Hopper, AMD/Intel, NPU, multi-GPU, or full-model convergence qualification is claimed. Maintainer approval and repository CI gates remain separate requirements.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com