better throughput scheduling with steady state cost model, now limited to spatial

This commit is contained in:
NiccoloN
2026-10-26 12:07:01 +01:00
parent fd493ae6e8
commit 4b53f6cf10
62 changed files with 4293 additions and 871 deletions
+12
View File
@@ -10,6 +10,18 @@ using namespace mlir;
namespace onnx_mlir {
bool isZeroBitPatternSplat(Attribute value) {
auto dense = dyn_cast_or_null<DenseElementsAttr>(value);
if (!dense || !dense.isSplat())
return false;
Attribute element = dense.getSplatValue<Attribute>();
if (auto floating = dyn_cast<FloatAttr>(element))
return floating.getValue().isZero() && !floating.getValue().isNegative();
if (auto integer = dyn_cast<IntegerAttr>(element))
return integer.getValue().isZero();
return false;
}
ConstantPool::ConstantPool(Operation *constantAnchor, OpBuilder &builder)
: anchor(constantAnchor), block(getConstantInsertionBlock(constantAnchor)),
builder(builder) {