/usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/jit/runtime
NameSizeModeActions
argument_spec.h168960644editdlrm
autodiff.h39930644editdlrm
calculate_necessary_args.h21000644editdlrm
custom_operator.h10790644editdlrm
exception_message.h6390644editdlrm
graph_executor.h44770644editdlrm
graph_executor_impl.h39020644editdlrm
graph_iterator.h49630644editdlrm
instruction.h38940644editdlrm
interpreter.h50810644editdlrm
jit_exception.h2700644editdlrm
logging.h26180644editdlrm
operator.h90600644editdlrm
operator_options.h1890644editdlrm
print_handler.h3400644editdlrm
profiling_graph_executor_impl.h20360644editdlrm
profiling_record.h89620644editdlrm
register_ops_utils.h437940644editdlrm
script_profile.h25320644editdlrm
slice_indices_adjust.h8210644editdlrm
symbolic_script.h5980644editdlrm
symbolic_shape_registry.h4250644editdlrm
vararg_functions.h10230644editdlrm
variable_tensor_list.h5450644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/jit/runtime/graph_executor_impl.h (3902B)
#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace torch { namespace jit { void packGradient(const Gradient& gradient, Node* dnode); bool needsGradient(const std::shared_ptr& graph); void runOptimization( std::shared_ptr& graph, bool unroll_non_constant_loops = true, bool const_prop_user_classes = true); void runNondiffOptimization( std::shared_ptr& graph, bool strict_fuser_check = false); void debugSetAutodiffSubgraphInlining(bool state); bool getAutodiffSubgraphInlining(); void debugSetFusionGroupInlining(bool state); bool getFusionGroupInlining(); // Tunable parameters for deciding when to create/keep subgraphs of // differentiable code const size_t autodiffSubgraphNodeThreshold = 2; const size_t autodiffSubgraphInlineThreshold = 5; // a Graph can be created via tracing, or via a language-based frontend // GraphExecutor runs it. It can run the same graph on many different sizes // and different requires_grad states, and handles specializations for each // situation. GraphExecutor is completely unaware of tracing or module // parameters to keep the tracing concerns separated. struct GraphExecutorImplBase { static std::shared_ptr prepareGraph( const std::shared_ptr& graph) { auto copy = graph->copy(); EraseShapeInformation(copy); return copy; } GraphExecutorImplBase( const std::shared_ptr& graph, std::string function_name) : graph(prepareGraph(graph)), function_name_(std::move(function_name)), num_inputs(this->graph->inputs().size()), num_outputs(this->graph->outputs().size()) {} // entry point where execution begins void run(Stack& stack); c10::intrusive_ptr runAsync( Stack& stack, TaskLauncher taskLauncher = at::launch); virtual const ExecutionPlan& getPlanFor( Stack& stack, size_t remaining_bailout_depth) = 0; virtual GraphExecutorState getDebugState() = 0; virtual ~GraphExecutorImplBase() = default; protected: friend struct GraphExecutor; // The unoptimized starting graph. This field is effectively const, but we // can't make it so because Graph::copy() is not const (and making it const is // not that easy at this point). // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) std::shared_ptr graph; // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) std::string function_name_; // If false, we'll run the graph as we get it, without any optimizations. // Useful for debugging. // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) const size_t num_inputs; // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) const size_t num_outputs; // GraphExecutors can be accessed from multiple threads, so this thread needs // to be held every time we access the fallback or plan_cache. // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) std::mutex compile_mutex; }; } // namespace jit } // namespace torch