Skip to content

Commit

Permalink
update Jan 15
Browse files Browse the repository at this point in the history
  • Loading branch information
lialan committed Jan 16, 2025
1 parent 6f232c9 commit 2e8d28b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ MaterializeEncodingTypeConverter::MaterializeEncodingTypeConverter(
addConversion([](FloatType floatType) { return floatType; });
addConversion([](MemRefType memrefType) { return memrefType; });
addConversion([=](RankedTensorType type) -> RankedTensorType {
MaterializeEncodingInfo encodingInfo = getEncodingInfo(type);
if (IREE::Encoding::hasPackedStorageAttr(type)) {
return type;
}
// For a given tensor type with an encoding, return the materialized
// type to use for it. If no encoding is set, then return the tensor type
// itself.
MaterializeEncodingInfo encodingInfo = getEncodingInfo(type);
if (IREE::Codegen::isIdentityLayout(encodingInfo)) {
return dropEncoding(type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Patterns.h"

#include "iree/compiler/Codegen/Common/EncodingUtils.h"
#include "iree/compiler/Dialect/HAL/Analysis/Captures.h"
#include "iree/compiler/Dialect/HAL/Conversion/StreamToHAL/Utils.h"
#include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
Expand Down Expand Up @@ -479,10 +478,7 @@ struct TensorExportBufferViewOpPattern
}

auto loc = exportOp.getLoc();
// Drop the encoding of packed_storage here, as it is no longer needed
// afterwards.
auto tensorType =
dropEncoding(llvm::cast<RankedTensorType>(adaptor.getSourceEncoding()));
auto tensorType = llvm::cast<RankedTensorType>(adaptor.getSourceEncoding());
auto dynamicDims = adaptor.getSourceEncodingDims();

// NOTE: we should have verified supported encodings/types at entry into the
Expand Down

0 comments on commit 2e8d28b

Please sign in to comment.