Skip to content

Commit

Permalink
fix(//core/lowering): Conv2D -> _convolution pass was triggering conv
Browse files Browse the repository at this point in the history
transpose instead of conv

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Jun 3, 2020
1 parent c83447e commit ca2b5f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/lowering/passes/conv2d_to_convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ void Conv2DToConvolution(std::shared_ptr<torch::jit::Graph>& graph) {
return (%4))IR";
std::string convolution_pattern = R"IR(
graph(%x, %w, %b, %s, %p, %d, %g):
%1 : bool = prim::Constant[value=1]()
%1 : bool = prim::Constant[value=0]()
%2 : int[] = prim::Constant[value=[0, 0]]()
%3 : bool = prim::Constant[value=0]()
%4 : Tensor = aten::_convolution(%x, %w, %b, %s, %p, %d, %1, %2, %g, %1, %1, %3)
%4 : Tensor = aten::_convolution(%x, %w, %b, %s, %p, %d, %1, %2, %g, %1, %1, %1)
return (%4))IR";;

// replace matmul + add pattern to linear
Expand Down

0 comments on commit ca2b5f9

Please sign in to comment.