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 @@ -71,7 +71,7 @@ def Linalg_TransformDialectCodegen
def Custom
: I32EnumAttrCase<"Custom", 1001>;

def EXSLERATEV2_Conv2D
def EXSLERATEV2_Conv2D
: I32EnumAttrCase<"Exsleratev2Conv2D", 1002>;

def EXSLERATEV2_Pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ iree_cc_library(
MLIRLinalgUtils
iree::compiler::Dialect::Encoding::IR
iree::compiler::Dialect::Util::IR
iree::compiler::Dialect::LinalgExt::Utils
PUBLIC
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ isEXSLTiledConvolutionInterfaceImpl(Operation *op) {
if (hascomplexExpr(indexingMaps.back())) {
return detail::MatchEXSLTiledConvolutionResult::OutputDimsNotParallel;
}

auto genericOp = dyn_cast<mlir::linalg::GenericOp>(linalgOp.getOperation());
Block &body = genericOp.getRegion().front();
bool hasmul = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "iree/compiler/Dialect/Util/Analysis/Constant/ConstExpr.h"

#include "iree/compiler/Dialect/LinalgExt/IR/LinalgExtDialect.h"
#include "iree/compiler/Dialect/LinalgExt/Utils/Utils.h"
#include "iree/compiler/Dialect/Util/Analysis/Constant/OpOracle.h"
#include "iree/compiler/Dialect/Util/Analysis/Explorer.h"
#include "iree/compiler/Dialect/Util/IR/UtilOps.h"
Expand Down Expand Up @@ -502,6 +504,28 @@ void ConstExprHoistingPolicy::makeDecision(
return;
}

// Check if this operation or any of its producers is a bit-extend operation
// (e.g., i8→f32 dequantization). Don't hoist these to keep quantized weights
// compact and avoid pulling dequantization into global initializers.
if (IREE::LinalgExt::isBitExtendOp(info->getOperation())) {
decision->disableHoist();
return;
}

// Also check if any producer is a bit-extend op - this catches the case
// where we're trying to hoist the result of: i8 -> sitofp -> mulf(scale)
for (auto *producer : info->producers) {
if (IREE::LinalgExt::isBitExtendOp(producer->getOperation())) {
LLVM_DEBUG({
llvm::dbgs()
<< "[ConstExprPolicy] Detected bit-extend producer, "
<< "disabling hoisting to keep quantized weights compact\n";
});
decision->disableHoist();
return;
}
}

// Otherwise, we can conditionally enable hoisting (based on cost model, etc).
// TODO: Implement further conditions.
decision->enableHoist();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static LogicalResult setDataTilingEncodings(RewriterBase &rewriter,
encodedInputOperands.push_back(setEncodingWrapper(
linalgOp.getDpsInputs()[1], IREE::Encoding::CONV_RHS));
encodedInitOperand = setEncodingWrapper(linalgOp.getDpsInits()[0],
IREE::Encoding::CONV_RESULT);
IREE::Encoding::CONV_RESULT);
} else {
encodedInputOperands.push_back(setEncodingWrapper(
linalgOp.getDpsInputs()[0], IREE::Encoding::SCALED_MATMUL_LHS));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ iree_cc_library(
"EraseUnusedLinalgOperands.cpp"
"ExpandTensorShapes.cpp"
"FuseDequantizationMatmul.cpp"
"GetPaddingValue.cpp"
"GeneralizeLinalgNamedOps.cpp"
"GlobalLoopInvariantCodeMotion.cpp"
"InferNumericNarrowing.cpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ void GeneralizeLinalgNamedOpsPass::runOnOperation() {
}
}


FailureOr<linalg::GenericOp> generalizedOp =
linalg::generalizeNamedOp(rewriter, linalgOp);
if (failed(generalizedOp)) {
Expand Down
16 changes: 0 additions & 16 deletions runtime/src/iree/schemas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,6 @@ flatbuffer_c_library(
PUBLIC
)

flatbuffer_c_library(
NAME
exsleratev2_executable_def_c_fbs
SRCS
"exsleratev2_executable_def.fbs"
FLATCC_ARGS
"--reader"
"--builder"
"--verifier"
"--json"
INCLUDES
"executable_debug_info.fbs"
PUBLIC
)


add_custom_command(OUTPUT cpu_data_headers_filegroup.stamp
COMMAND ${CMAKE_COMMAND} -E touch cpu_data_headers_filegroup.stamp
DEPENDS
Expand Down
Loading