Fix Cuda Graph based MOE Tests Hang in CI - #3210
Conversation
Signed-off-by: Varun Thumbe <vthumbe@nvidia.com>
|
/te-ci pytorch |
Greptile SummaryThis PR updates grouped linear CUDA graph tests to avoid CI hangs and unstable padded-row checks. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into grouped_linear_..." | Re-trigger Greptile |
|
Pipeline: 58029914 |
Signed-off-by: Varun Thumbe <vthumbe@nvidia.com>
|
/te-ci pytorch |
There was a problem hiding this comment.
LGTM. Can you elaborate more on how "insufficient cleanup" was causing the hang?
Good catch that we weren't running the non-graphed implementation. It is awkward that make_graphed_callables changes the module forward so it always replays the graph, but this is also the behavior in torch.cuda.make_graphed_callables.
|
@timmoon10 I dug a bit deeper and actually it turns out the hang was due to CUDA graph replay compatibilty with CUBLAS GGEMM which exists currently. And it specifically happens on the second graph replay which was happening unintentionally in the test |
Description
make_graphed_callables function returns the module replaced with the graphed module. Recent pytorch upgrade caused the graph replay to hang due to insufficient cleanup.
Irresspective, we were comparing the forward and backward results of the same graphed module being run twice, instead of actually running the non graphed and graphed module and comparing their results numerically.
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: