Skip to content

Commit

Permalink
Fix the te fuser setup (#963)
Browse files Browse the repository at this point in the history
Summary:
Correctly enable `te` fuser environment when fuser is specified as `te`.
Fixes #956

Pull Request resolved: #963

Reviewed By: davidberard98

Differential Revision: D37218257

Pulled By: xuzhao9

fbshipit-source-id: 07019cd3fd302213eb8c21245abaa9fcfbb3b6ae
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Jun 17, 2022
1 parent 92c20c6 commit 842466b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ def pytest_addoption(parser):

def set_fuser(fuser):
if fuser == "te":
# use default fuser (TE) and
# profiling executor settings
pass
torch._C._jit_set_profiling_executor(True)
torch._C._jit_set_profiling_mode(True)
torch._C._jit_override_can_fuse_on_cpu(True)
torch._C._jit_override_can_fuse_on_gpu(True)
torch._C._jit_set_texpr_fuser_enabled(True)
elif fuser == "old":
torch._C._jit_set_profiling_executor(False)
torch._C._jit_set_profiling_mode(False)
Expand Down

0 comments on commit 842466b

Please sign in to comment.