mirror of https://github.com/Jittor/Jittor
Add a flag
This commit is contained in:
parent
1a91f1dd01
commit
a44c016408
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.5.15'
|
||||
__version__ = '1.3.5.16'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -39,6 +39,7 @@ Executor exe;
|
|||
EXTERN_LIB MemoryProfiler memory_profiler;
|
||||
DECLARE_FLAG(int, profile_memory_enable);
|
||||
DEFINE_FLAG(int, gopt_disable, 0, "Disable graph optimizer.");
|
||||
DEFINE_FLAG(int, use_threading, 0, "Allow to use python threading with jittor.");
|
||||
|
||||
// from fetch_op.cc
|
||||
EXTERN_LIB list<VarPtr> fetcher_to_free;
|
||||
|
@ -192,7 +193,7 @@ static void top_weak_sync(vector<Var*>& vars) {
|
|||
}
|
||||
|
||||
void Executor::run_sync(vector<Var*> vars, bool device_sync, bool weak_sync) {
|
||||
if (weak_sync)
|
||||
if (weak_sync && !use_threading)
|
||||
top_weak_sync(vars);
|
||||
auto allocator = get_allocator();
|
||||
auto temp_allocator = get_allocator(true);
|
||||
|
|
Loading…
Reference in New Issue