mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[JIT] Switch executor from Simple to Legacy. (#41017)
* properly skip legacy tests regardless of the default executor (#40381) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/40381 Differential Revision: D22173938 Pulled By: Krovatkin fbshipit-source-id: 305fc4484977e828cc4cee6e053a1e1ab9f0d6c7 * [JIT] Switch executor from Simple to Legacy. This is done for 1.6 only in order to recover performance regressions caused by the Legacy->Simple switch that was done in 1.5. On master we still plan to use Simple executor and fix the performance issues in 1.7 without falling back to the Legacy executor. Co-authored-by: Nikolay Korovaiko <korovaikon@gmail.com>
This commit is contained in:
parent
01e9562313
commit
11b70b0041
|
|
@ -9,6 +9,15 @@ import torch.nn as nn
|
|||
import torch.nn.functional as F
|
||||
from torch.testing import FileCheck
|
||||
|
||||
# these needs to be set before `common_utils`
|
||||
# infers `GRAPH_EXECUTOR`.
|
||||
# this file **requires** these settings
|
||||
# and setting them after `GRAPH_EXECUTOR` is
|
||||
# inferred erroneously runs or skips
|
||||
# some tests
|
||||
torch._C._jit_set_profiling_executor(True)
|
||||
torch._C._jit_set_profiling_mode(True)
|
||||
|
||||
from torch.testing._internal.common_utils import run_tests, IS_SANDCASTLE, ProfilingMode, GRAPH_EXECUTOR, \
|
||||
enable_profiling_mode_for_profiling_tests, skipIfRocm
|
||||
from torch.testing._internal.jit_utils import JitTestCase, _inline_everything, \
|
||||
|
|
@ -22,9 +31,6 @@ from test_jit import backward_graph, all_backward_graphs, get_lstm_inputs, get_m
|
|||
|
||||
from te_utils import CudaCodeGenExecuted
|
||||
|
||||
torch._C._jit_set_profiling_executor(True)
|
||||
torch._C._jit_set_profiling_mode(True)
|
||||
|
||||
FUSION_GROUP = 'tensorexpr::Group'
|
||||
|
||||
def strip_profiling_nodes(nodes):
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace jit {
|
|||
static std::atomic<bool> executor_mode{true};
|
||||
static std::atomic<bool> profiling_mode{false};
|
||||
#else
|
||||
static std::atomic<bool> executor_mode{true};
|
||||
static std::atomic<bool> executor_mode{false};
|
||||
static std::atomic<bool> profiling_mode{false};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user