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 |
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: