Skip to content

Commit 2e82899

Browse files
authored
add has_value check for input size when freeze (#1391)
1 parent a81bd70 commit 2e82899

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

csrc/jit/passes/graph_rewrite_conv.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ void replaceFrozenIPEXConvWithAtenConv(
3434
->cast<TensorType>()
3535
->sizes()
3636
.concrete_sizes();
37+
if (!input_size_option.has_value()) {
38+
continue;
39+
}
3740
auto prepack_node = n->inputs().at(3)->node()->inputs().at(0);
3841
// For graph before "freeze", cannot get custom class to repack
3942
if (!toIValue(prepack_node).has_value())

0 commit comments

Comments
 (0)