Skip to content

Commit

Permalink
Disable nvtx decorator to avoid graph break as in #5697
Browse files Browse the repository at this point in the history
  • Loading branch information
oelayan7 committed Jun 25, 2024
1 parent 2ce397c commit 24cf9f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepspeed/inference/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import torch
import time
import os
import deepspeed.utils.nvtx
from deepspeed import comm as dist
from deepspeed.utils.logging import log_dist

Expand Down Expand Up @@ -646,6 +647,9 @@ def compile(self, backend=get_accelerator().get_compile_backend(), compile_kwarg

if self._is_compiled:
return

# Avoid graph breaks
nvtx.enable_nvtx = False
self.module.compile(backend=backend, **compile_kwargs)
self._is_compiled = True

Expand Down

0 comments on commit 24cf9f6

Please # to comment.