909c4acfdd
Validate Operations / validate-operations (push) Has been cancelled
remove Spatial many ops in favor of tensor ops like in pim
18 lines
531 B
C++
18 lines
531 B
C++
#pragma once
|
|
|
|
#include "mlir/IR/Operation.h"
|
|
#include "mlir/IR/PatternMatch.h"
|
|
|
|
#include <optional>
|
|
|
|
namespace onnx_mlir {
|
|
|
|
std::optional<unsigned> getDirectComputeLikeInputIndex(mlir::Operation* owner, unsigned operandNumber);
|
|
|
|
void replaceAndEraseDirectComputeLikeInput(mlir::PatternRewriter& rewriter,
|
|
mlir::Operation* owner,
|
|
unsigned inputIndex,
|
|
mlir::Value replacement);
|
|
|
|
} // namespace onnx_mlir
|