We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fc0e61 commit 6a56e15Copy full SHA for 6a56e15
1 file changed
src/megatron/bridge/training/train.py
@@ -1567,11 +1567,7 @@ def _delete_cuda_graphs(cuda_graph_helper: TECudaGraphHelper):
1567
1568
# Cleanup CUDA graphs object for partial Cuda-graphs (implemented in TransformerEngine)
1569
if cuda_graph_helper is not None:
1570
- for layers in cuda_graph_helper.callables_per_chunk:
1571
- for layer in layers:
1572
- for cuda_graph in layer.cuda_graphs:
1573
- del cuda_graph
1574
- del layer.cuda_graphs
+ cuda_graph_helper.delete_cuda_graphs()
1575
1576
# Run GC to collect the freshed object
1577
gc.collect()
0 commit comments