Benchmarks: add 'default' options for fuser and executor. (#45347)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/45347

Test Plan: Imported from OSS

Reviewed By: Krovatkin

Differential Revision: D23935519

Pulled By: ZolotukhinM

fbshipit-source-id: 8323fafe7828683c4d29c12a1e5722adb6f945ff
This commit is contained in:
Mikhail Zolotukhin 2020-09-26 23:06:46 -07:00 committed by Facebook GitHub Bot
parent 37a671abc7
commit 8cef7326f4

View file

@ -1,7 +1,7 @@
import torch
def set_fuser(fuser_name, executor_name):
assert fuser_name in ['te', 'old', 'none']
assert fuser_name in ['te', 'old', 'none', 'default']
if fuser_name == 'te':
torch._C._jit_set_profiling_executor(True)
torch._C._jit_set_profiling_mode(True)
@ -21,6 +21,8 @@ def set_fuser(fuser_name, executor_name):
torch._C._jit_override_can_fuse_on_gpu(False)
torch._C._jit_override_can_fuse_on_cpu(False)
torch._C._jit_set_texpr_fuser_enabled(False)
elif fuser_name == 'default':
pass
# --executor overrides settings of --fuser
if executor_name == 'profiling':
@ -34,3 +36,5 @@ def set_fuser(fuser_name, executor_name):
elif executor_name == 'legacy':
torch._C._jit_set_profiling_executor(False)
torch._C._jit_set_profiling_mode(False)
elif executor_name == 'default':
pass