Repository navigation
Conversation
Signed-off-by: Kaining Zhong <kainingz@nvidia.com>
[Medium impact] The changes affect CuTeDSL users who opt in, including JAX users. The PR appears safe to merge, with a non-blocking request to test the new GC pause. Findings
SummaryThis PR allows JAX to use the optional CuTeDSL backend without forcing it off at import.
Reviews (1) · Last reviewed commit: "[Common, JAX] Enable CuTeDSL in JAX and ..." · Reviewed by Greptile |
| bool success = false; | ||
| { | ||
| PythonGCPause gc_pause; | ||
| success = cfg.retrieve_func_from_python(key); | ||
| } |
There was a problem hiding this comment.
GC pause lacks regression tests
The new pause has no focused test. Existing JAX tests compare kernel outputs and check registration, but do not check that GC stays disabled during compilation or returns to its prior state afterward. Those tests could still pass if a later change brings back the CUDA capture error or leaves GC disabled.
Add tests for GC starting enabled and disabled, overlapping pauses, and a compilation failure.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
/te-ci L2 |
Description
This enables CuTeDSL in JAX and fix the
CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTEDerror before by pausing python GC during CuTeDSL compilation.This will only defer releasing allocated python objects during CuTeDSL compilation until the next time a GC is triggered, so it only affect peak CPU memory usage by a tiny bit (claude says a MB or so) and it shouldn't affect GPU memory since it's compilation only. No memory is truly leaked.
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: