Skip to content

Commit

Permalink
Another dce fix (pytorch#22499)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#22499

Another place where onnx export is running dead code elimination after making the jit graph invalid. Fixing it.

Reviewed By: houseroad

Differential Revision: D16111969

fbshipit-source-id: 5ba80340c06d091988858077f142ea4e3da0638c
  • Loading branch information
smessmer authored and facebook-github-bot committed Jul 3, 2019
1 parent d9e15bc commit 2732a5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/onnx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def _model_to_graph(model, args, verbose=False, training=False,

if do_constant_folding and _export_onnx_opset_version == 9:
params_dict = torch._C._jit_pass_onnx_constant_fold(graph, params_dict)
torch._C._jit_pass_dce(graph)
torch._C._jit_pass_dce_allow_deleting_nodes_with_side_effects(graph)

if verbose:
print(graph)
Expand Down

0 comments on commit 2732a5e

Please sign in to comment.