Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ common::DataLayout PreferLayoutImpl<Conv2dOp>(pir::Operation* op) {
}

template <>
std::vector<pir::Value> RelevantInputsImpl<Conv2dOp>(pir::Operation* op) {
// Note(lyk): We exhibit the layout transformation for filter of conv2d
// due to issues with its infermeta and kernel not functioning
// properly in NHWC layout. However, if the FLAGS_manually_trans_conv_filter
// is enabled, the transfer_layout_pass can also operate correctly.
auto concrete_op = op->dyn_cast<Conv2dOp>();
return {concrete_op.input()};
bool CanBeModifiedImpl<Conv2dOp>(pir::Operation* op) {
return false;
}

template <>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ OVERLOAD_CAN_BE_MODIFIED(FusedConv2dAddActOp);

class Conv2dOp;
OVERLOAD_PREFER_LAYOUT(Conv2dOp);
OVERLOAD_RELEVANT_INPUTS(Conv2dOp);
OVERLOAD_CAN_BE_MODIFIED(Conv2dOp);
OVERLOAD_REWRITE_BY_LAYOUT(Conv2dOp);

class GroupNormOp;
Expand Down