Repository navigation
[Common] Make CI fail if CuTeDSL kernels with supported configs are not used - #3746
Conversation
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
[Medium impact] The PR appears safe to merge; no new actionable issues were established. SummaryAdds opt-in warnings or errors when an enabled CuTeDSL backend falls back to CUDA.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MXFP8 request] --> B{CuTeDSL enabled?}
B -->|No| C[Use CUDA]
B -->|Yes| D{2D quantization?}
D -->|Yes| C
D -->|No| E{CuTeDSL kernel available?}
E -->|Yes| F[Use CuTeDSL]
E -->|No| G{Report setting}
G -->|Unset| C
G -->|WARN| H[Warn and use CUDA]
G -->|ERROR| I[Raise an error]
Reviews (6) · Last reviewed commit: "Merge branch 'main' into warn_or_fail_wh..." · Reviewed by Greptile |
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
1 similar comment
|
/te-ci |
| If these requirements are not met, Transformer Engine will fall back to using CUDA C++ kernels if possible. | ||
|
|
||
| .. envvar:: NVTE_WARN_IF_CUTEDSL_BACKEND_NOT_CHOSEN | ||
| .. envvar:: NVTE_REPORT_IF_CUTEDSL_BACKEND_NOT_CHOSEN |
There was a problem hiding this comment.
This is a breaking change due to the envvar change, so we should mark that in the description box, which would be later useful for relnotes
| "pydantic", | ||
| "importlib-metadata>=1.0", | ||
| "packaging", | ||
| "cuda-bindings", |
There was a problem hiding this comment.
It's used by quantize_mxfp8.py and fused_mla_q_uproj.py. nvidia-cutlass-dsl should always depends on this but I think it's clearer to explicitly mark this as a dependency
There was a problem hiding this comment.
In that case we should also mark nvidia-cutlass-dsl and tvi-ffi as required dependencies. Currently those are user installed, which is fine because this is an optional backend. So for consistency either all or none should be included.
There was a problem hiding this comment.
Actually fused_mla_q_uproj.py uses cuda-bindings for passing the stream to cudnn-fe's kernel so I guess we can make this a dependency for all. For nvidia-cutlass-dsl and tvm-ffi, you can use CUDA kernels if you don't install these so I think we should make them dependency when we move to 3.0 and get rid of CUDAS kernels?
There was a problem hiding this comment.
OK I removed this
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
|
/te-ci |
|
Actually we should merge #3743 first |
|
/te-ci |
1 similar comment
|
/te-ci |
maybe_warn_cutedsl_not_chosen was renamed to report_cutedsl_not_chosen in NVIDIA#3746, so this file no longer compiled with NVTE_WITH_CUTEDSL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
maybe_warn_cutedsl_not_chosen was renamed to report_cutedsl_not_chosen in NVIDIA#3746, so this file no longer compiled with NVTE_WITH_CUTEDSL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
* [Common] More CuTeDSL MXFP8 special kernels Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * wip Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * wip Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * disable invariant temporarily Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * also support swizzled scale for g2r bidim Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * lint Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * add tests Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * nit Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * more refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * g2r bidim can also support colwise only Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * make g2r support activations Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * +0 and -0 should both legal Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * nit Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * fix Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * close fp32 perf gap Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * can always use static tile num Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * draft: gated mxfp8 cutedsl kernel Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * nit Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * move gated config to common Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * overhaul Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * nit Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * rename & refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * rename Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * nit Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use report_cutedsl_not_chosen in the CuTeDSL dispatch maybe_warn_cutedsl_not_chosen was renamed to report_cutedsl_not_chosen in #3746, so this file no longer compiled with NVTE_WITH_CUTEDSL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * refactor Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * specialize with SKIP_SCALE_BOUNDS Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * support BWD gated with N%128 != 0 Signed-off-by: Kaining Zhong <kainingz@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove unused Tuple import Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kaining Zhong <kainingz@nvidia.com> --------- Signed-off-by: Kaining Zhong <kainingz@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Description
We need fail cases where we expect CuTeDSL kernels are used to avoid silent fallbacks like #3743 catches. This also introduces a breaking change that
NVTE_WARN_IF_CUTEDSL_BACKEND_NOT_CHOSENis changed toNVTE_REPORT_IF_CUTEDSL_BACKEND_NOT_CHOSENwhich can warn or fail the test.Type of change
Changes
Please list the changes introduced in this PR:
Checklist: