Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
  • Loading branch information
Max191 committed Sep 20, 2024
1 parent 0a00cfd commit e5160bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct DecomposePackUnPackOpsPass final
void runOnOperation() override;

private:
std::optional<PackUnPackControlFn> controlFn = std::nullopt;
std::optional<PackUnPackControlFn> controlFn;
};

} // namespace
Expand Down
11 changes: 6 additions & 5 deletions compiler/src/iree/compiler/Codegen/Common/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ std::unique_ptr<InterfacePass<FunctionOpInterface>>
createConvolutionToIGEMMPass(ConfigFn configFn);

using PackUnPackControlFn = std::function<LogicalResult(Operation *)>;
// Pass to decompose pack and unpack ops into pad/extract_slice and reshape ops.
// If specified, `controlFn` controls which ops get decomposed. The `controlFn`
// should be used with `useOnlyReshapes` set to true.
// TODO(Max191): Add a controlFn upstream for `GeneralizeOuterUnitDim*` patterns
// and remove the need to have `useOnlyReshapes = true` when using `controlFn`.
/// Pass to decompose pack and unpack ops into pad/extract_slice and reshape
/// ops. If specified, `controlFn` controls which ops get decomposed. The
/// `controlFn` should be used with `useOnlyReshapes` set to true.
/// TODO(Max191): Add a controlFn upstream for `GeneralizeOuterUnitDim*`
/// patterns and remove the need to have `useOnlyReshapes = true` when using
/// `controlFn`.
std::unique_ptr<InterfacePass<FunctionOpInterface>>
createDecomposePackUnPackOpsPass(bool tileOuterToOne, bool useOnlyReshapes,
std::optional<PackUnPackControlFn> controlFn);
Expand Down

0 comments on commit e5160bf

Please sign in to comment.