Repository navigation
Conversation
a7faf28 to
0a9181e
Compare
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryThis PR replaces the compute-capability query’s
Reviews (9) · Last reviewed commit: "fix" · Reviewed by Greptile |
|
/te-ci |
0a9181e to
a8dd393
Compare
Signed-off-by: CarlosGomes98 <carlosmiguel.gomes@live.com.pt>
a8dd393 to
07fc40d
Compare
|
/te-ci L0 |
| """(major, minor) compute capability of a CUDA device (current by default), or (0, 0) if it can't be queried.""" | ||
| from cuda.core import Device # pylint: disable=no-name-in-module | ||
| # pylint: disable=c-extension-no-member | ||
| from cuda.bindings import runtime as cudart # pylint: disable=no-name-in-module |
There was a problem hiding this comment.
you should have docs/envvars.rst include cuda.bindings, instead of cuda.core, also?
There was a problem hiding this comment.
seems like cuda-bindings already comes in transitively with nvidia-cutlass-dsl, as shown when I did this on dlcluster venv:
pip show cuda-bindings cuda-python cuda-core nvidia-cutlass-dsl-libs-base nvidia-cutlass-dsl-libs-cu12 | grep -E "^(Name|Version|Requires|Required-by)"
WARNING: Package(s) not found: cuda-core, cuda-python
Name: cuda-bindings
Version: 13.4.4
Requires: cuda-pathfinder
Required-by: nvidia-cutlass-dsl-libs-base, nvidia-cutlass-dsl-libs-core, nvidia-cutlass-dsl-libs-cu12
Name: nvidia-cutlass-dsl-libs-base
Version: 4.8.1
Requires: backports.strenum, cuda-bindings, nvidia-cutlass-dsl-libs-core, protobuf, typing-extensions
Required-by: nvidia-cutlass-dsl, nvidia-cutlass-dsl-libs-cu12
Name: nvidia-cutlass-dsl-libs-cu12
Version: 4.8.1
Requires: backports.strenum, cuda-bindings, nvidia-cutlass-dsl-libs-base, protobuf, typing-extensions
Required-by: nvidia-cutlass-dsl
Disregard comment
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
@CarlosGomes98 OK actually with your fix, our C++ unit tests will no longer fall back to CUDA and will use CuTeDSL kernels, which reveals an tiny mismatch in my CuTeDSL kernels that would cause a non-bit-exact result than CUDA's Can you merge CarlosGomes98#1 into your branch? So we can let CI pass for now. I'll ask around to see if this is the canon behavior or we should do the other way around and probably open another PR to flip both CUDA and CuTeDSL |
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
This reverts commit 1b5cf2e. Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
The fused/general MXFP8 quantize kernel started each block amax at 0 with a NaN-ignoring max, so an all-NaN block (e.g. dGeLU/dSiLU/dQGeLU of +-inf) got scale 0x00. The CuTeDSL kernels and CUDA's specialized cast-only kernels give 0xFF, the E8M0 NaN code, which is the agreed behavior. Seed the per-block amax with NaN instead, so it stays NaN only when every element is NaN. Out-of-bounds elements now count as 0 in the activation paths (as TMA zero-fill already does without activations), so fully-OOB blocks do not write 0xFF into the scale padding. 2D block scaling keeps the 0 seed since its warp reduction assumes a non-negative amax. The tensor amax still ignores NaN. Update the C++ reference to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
[Common] Let CuTeDSL match CUDA's NaN handling
…ize kernel" This reverts commit 1c7d712. The all-NaN MXFP8 block scale will be standardized on 0xFF in a follow-up. Until then, keep CUDA and CuTeDSL agreeing on 0. Signed-off-by: Kaining Zhong <kainingz@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/te-ci |
This reverts commit cb5619e. Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
1 similar comment
|
/te-ci |
…block scales - SiLU is x * sigmoid(x), as util/math.h computes it; x / (1 + exp(-x)) rounds differently, so FP32 SiLU differed from CUDA. - The general kernel carries one dbias sum down the column across its stages, as the CUDA kernels do, instead of adding 32-row partial sums. - With FP16 or FP32 input, the register-resident kernel seeds its block amaxes with NaN, so a block of only NaNs gets the NaN scale (0xFF), as in CUDA's generic kernel since PR NVIDIA#3743 and in the other CuTeDSL kernels. - FP32 dbias+dGeLU takes the register-resident kernel, whose dbias matches CUDA (the general kernel's still differs in the last bit for FP32). mxh2 parity against TE main (CUDA), tables off, 702 cases over BF16/FP16/FP32, all modes, layouts and fills including special values: 678 match (PR NVIDIA#3642 alone: 464). The rest are FP32 dbias with rowwise-only output, where CUDA adds row pairs (r, r + 32) before summing. Signed-off-by: Teddy Do <tdophung@nvidia.com>
Description
Cutedsl kernels rely on cuda.core to check compute capability, but this is not a TE dependency.
This will make CI able to run using CuTeDSL kernels instead of falling back to CUDA kernels. It also fixes how a all NaN 32 element block is handed so now the scale will be NaN instead of 0 when all elements are NaN, and it's consistent across different configurations for both CUDA and CuTeDSL so the CI tests can pass.
Fixes #3793
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: