mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[JIT] add GRAPH_DEBUG for setGraphExecutorOptimize (#153549)
Summary: Optionally log when setGraphExecutorOptimize is called, so we can get insight into the GraphExecutor behavior. Differential Revision: D74692508 Pull Request resolved: https://github.com/pytorch/pytorch/pull/153549 Approved by: https://github.com/PaulZhang12, https://github.com/SamGinzburg
This commit is contained in:
parent
dda2c7c8fc
commit
5e6e52e7c9
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include <c10/util/StringUtil.h>
|
||||
#include <torch/csrc/Export.h>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include <torch/csrc/jit/jit_log.h>
|
||||
#include <torch/csrc/jit/python/update_graph_executor_opt.h>
|
||||
|
||||
namespace torch::jit {
|
||||
|
|
@ -5,6 +6,7 @@ namespace torch::jit {
|
|||
static thread_local bool kOptimize = true;
|
||||
void setGraphExecutorOptimize(bool o) {
|
||||
kOptimize = o;
|
||||
GRAPH_DEBUG("GraphExecutorOptimize set to ", o);
|
||||
}
|
||||
bool getGraphExecutorOptimize() {
|
||||
return kOptimize;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user