/
usr
/
local
/
lib64
/
python3.6
/
site-packages
/
torch
/
include
/
torch
/
csrc
/
jit
/
passes
/
/usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/jit/passes
mkdir
upload
Name
Size
Mode
Actions
quantization/
-
0755
rm
utils/
-
0755
rm
annotate_warns.h
192
0644
edit
dl
rm
bailout_graph.h
1129
0644
edit
dl
rm
batch_mm.h
163
0644
edit
dl
rm
canonicalize.h
492
0644
edit
dl
rm
canonicalize_graph_fuser_ops.h
177
0644
edit
dl
rm
clear_profiling.h
334
0644
edit
dl
rm
clear_undefinedness.h
889
0644
edit
dl
rm
common_subexpression_elimination.h
194
0644
edit
dl
rm
concat_opt.h
481
0644
edit
dl
rm
constant_pooling.h
177
0644
edit
dl
rm
constant_propagation.h
1287
0644
edit
dl
rm
create_autodiff_subgraphs.h
552
0644
edit
dl
rm
create_functional_graphs.h
323
0644
edit
dl
rm
cuda_graph_fuser.h
860
0644
edit
dl
rm
dead_code_elimination.h
1584
0644
edit
dl
rm
decompose_ops.h
168
0644
edit
dl
rm
erase_number_types.h
813
0644
edit
dl
rm
fixup_trace_scope_blocks.h
1673
0644
edit
dl
rm
fold_conv_bn.h
995
0644
edit
dl
rm
freeze_module.h
1236
0644
edit
dl
rm
frozen_conv_add_relu_fusion.h
233
0644
edit
dl
rm
frozen_conv_folding.h
872
0644
edit
dl
rm
frozen_graph_optimizations.h
435
0644
edit
dl
rm
frozen_ops_to_mkldnn.h
414
0644
edit
dl
rm
fuse_linear.h
526
0644
edit
dl
rm
fuse_relu.h
273
0644
edit
dl
rm
graph_fuser.h
1251
0644
edit
dl
rm
graph_rewrite_helper.h
1785
0644
edit
dl
rm
guard_elimination.h
390
0644
edit
dl
rm
hoist_conv_packed_params.h
211
0644
edit
dl
rm
inliner.h
199
0644
edit
dl
rm
inline_autodiff_subgraphs.h
275
0644
edit
dl
rm
inline_forked_closures.h
241
0644
edit
dl
rm
inline_fork_wait.h
547
0644
edit
dl
rm
inplace_check.h
168
0644
edit
dl
rm
insert_guards.h
453
0644
edit
dl
rm
integer_value_refinement.h
234
0644
edit
dl
rm
lift_closures.h
236
0644
edit
dl
rm
liveness.h
663
0644
edit
dl
rm
loop_unrolling.h
1006
0644
edit
dl
rm
lower_grad_of.h
348
0644
edit
dl
rm
lower_graph.h
750
0644
edit
dl
rm
lower_tuples.h
666
0644
edit
dl
rm
metal_rewrite.h
606
0644
edit
dl
rm
normalize_ops.h
536
0644
edit
dl
rm
onnx.h
967
0644
edit
dl
rm
pass_manager.h
4635
0644
edit
dl
rm
peephole.h
507
0644
edit
dl
rm
peephole_alias_sensitive.h
355
0644
edit
dl
rm
peephole_dict_idioms.h
1000
0644
edit
dl
rm
peephole_list_idioms.h
2003
0644
edit
dl
rm
peephole_non_tensor.h
342
0644
edit
dl
rm
prepack_folding.h
358
0644
edit
dl
rm
remove_dropout.h
280
0644
edit
dl
rm
remove_exceptions.h
954
0644
edit
dl
rm
remove_expands.h
175
0644
edit
dl
rm
remove_inplace_ops.h
296
0644
edit
dl
rm
remove_mutation.h
2674
0644
edit
dl
rm
remove_redundant_profiles.h
196
0644
edit
dl
rm
requires_grad_analysis.h
260
0644
edit
dl
rm
restore_mutation.h
1887
0644
edit
dl
rm
shape_analysis.h
463
0644
edit
dl
rm
specialize_autogradzero.h
656
0644
edit
dl
rm
subgraph_rewrite.h
4112
0644
edit
dl
rm
symbolic_shape_analysis.h
641
0644
edit
dl
rm
tensorexpr_fuser.h
2077
0644
edit
dl
rm
update_differentiable_graph_requires_grad.h
740
0644
edit
dl
rm
value_refinement_utils.h
2669
0644
edit
dl
rm
variadic_ops.h
993
0644
edit
dl
rm
vulkan_rewrite.h
576
0644
edit
dl
rm
xnnpack_rewrite.h
917
0644
edit
dl
rm
Edit:
/usr/local/lib64/python3.6/site-packages/torch/include/torch/csrc/jit/passes/loop_unrolling.h
(1006B)
#pragma once #include <torch/csrc/jit/ir/ir.h> namespace torch { namespace jit { // return true if graph is modified TORCH_API bool UnrollLoops(std::shared_ptr<Graph>& graph); // Only unrolls constant loops. Will unroll them regardless of loop block size TORCH_API bool UnrollConstantLoops(std::shared_ptr<Graph>& graph); TORCH_API Node* PeelLoop(Node* n, size_t times); // return true if graph is modified TORCH_API bool PeelProfilingLoops(const std::shared_ptr<Graph>& graph); struct TORCH_API LoopsPeeler { LoopsPeeler(std::function<bool(Node* n)> callback, size_t num_iterations = 1) : callback_(std::move(callback)), num_iterations_(num_iterations) {} bool run(const std::shared_ptr<Graph>& graph); private: void collectLoop(Node* n); void collectLoops(Block* block); void peelLoops(); std::function<bool(Node* n)> callback_ = nullptr; Node* in_loop_ = nullptr; std::list<Node*> loops_to_peel_; size_t num_iterations_ = 1; }; } // namespace jit } // namespace torch
Save
cmd:
run