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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
[submodule "third_party/aie_api"]
path = third_party/aie_api
url = https://github.com/jgmelber/aie_api
[submodule "third_party/mlir-python-extras"]
path = third_party/mlir-python-extras
url = https://github.com/erwei-xilinx/mlir-python-extras.git
Original file line number Diff line number Diff line change
Expand Up @@ -1242,10 +1242,7 @@ struct AIEObjectFifoStatefulTransformPass
int64_t tripCount = 0;
if (remLoop.getSingleLowerBound() &&
remLoop.getSingleUpperBound() && remLoop.getSingleStep()) {
tripCount = constantTripCount(*(remLoop.getSingleLowerBound()),
*(remLoop.getSingleUpperBound()),
*(remLoop.getSingleStep()))
.value_or(0);
tripCount = remLoop.getStaticTripCount()->getSExtValue();
}
int unrollFactor =
computeLCM(objFifoSizes); // also counts original loop body
Expand Down
3 changes: 1 addition & 2 deletions lib/Dialect/AIEVec/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ add_mlir_dialect_library(MLIRAIEVecTransforms
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRAIEVecUtils
MLIRCopyOpInterface)
MLIRAIEVecUtils)
8 changes: 4 additions & 4 deletions lib/Dialect/AIEVec/Transforms/CopyRemoval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "aie/Dialect/AIEVec/Pipelines/Passes.h"

#include "mlir/Interfaces/CopyOpInterface.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Pass/Pass.h"

Expand Down Expand Up @@ -55,7 +55,7 @@ class CopyRemovalPass : public PassWrapper<CopyRemovalPass, OperationPass<>> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CopyRemovalPass)

void runOnOperation() override {
getOperation()->walk([&](CopyOpInterface copyOp) {
getOperation()->walk([&](memref::CopyOp copyOp) {
reuseCopySourceAsTarget(copyOp);
reuseCopyTargetAsSource(copyOp);
});
Expand Down Expand Up @@ -159,7 +159,7 @@ class CopyRemovalPass : public PassWrapper<CopyRemovalPass, OperationPass<>> {
/// TODO: Alias analysis is not available at the moment. Currently, we check
/// if there are any operations with memory effects between copy and
/// deallocation operations.
void reuseCopySourceAsTarget(CopyOpInterface copyOp) {
void reuseCopySourceAsTarget(memref::CopyOp copyOp) {
if (eraseList.count(copyOp))
return;

Expand Down Expand Up @@ -210,7 +210,7 @@ class CopyRemovalPass : public PassWrapper<CopyRemovalPass, OperationPass<>> {
/// TODO: Alias analysis is not available at the moment. Currently, we check
/// if there are any operations with memory effects between copy and
/// deallocation operations.
void reuseCopyTargetAsSource(CopyOpInterface copyOp) {
void reuseCopyTargetAsSource(memref::CopyOp copyOp) {
if (eraseList.count(copyOp))
return;

Expand Down
12 changes: 6 additions & 6 deletions lib/Dialect/AIEVec/Transforms/VectorToAIEVecConversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ struct FoldVectorExtractAndSplatToAIEBroadcast
if (!extOp)
return failure();

auto src = extOp.getVector();
auto src = extOp.getSource();
auto pos = extOp.getStaticPosition();
int64_t posVal = pos[0];
auto srcVecType = cast<VectorType>(src.getType());
Expand Down Expand Up @@ -978,7 +978,7 @@ struct FoldSplatToFMAOp : OpConversionPattern<aievec::aie1::FMAOp> {
if (!extOp)
return failure();

auto rhs = extOp.getVector();
auto rhs = extOp.getSource();
auto concatVecType = cast<VectorType>(concatOp.getResult().getType());
auto zvec = rewriter.create<arith::ConstantOp>(
concatOp.getLoc(), lhs.getType(), rewriter.getZeroAttr(lhs.getType()));
Expand Down Expand Up @@ -1854,7 +1854,7 @@ struct LowerVectorExtractStridedSliceOpAIEv1Pattern

int64_t offset = cast<IntegerAttr>(adaptor.getOffsets()[0]).getInt();
auto selectOp = rewriter.create<aievec::aie1::SelectOp>(
extractOp.getLoc(), vType, adaptor.getVector(),
extractOp.getLoc(), vType, adaptor.getSource(),
buildAttributeListForRotationSelectOp(rewriter, vType, offset));
rewriter.replaceOpWithNewOp<aievec::aie1::ExtOp>(
extractOp, extractOp.getType(), selectOp.getResult(),
Expand All @@ -1872,7 +1872,7 @@ struct LowerVectorExtractStridedSliceOpAIE2Pattern
LogicalResult
matchAndRewrite(vector::ExtractStridedSliceOp extractOp, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
auto vType = cast<VectorType>(adaptor.getVector().getType());
auto vType = cast<VectorType>(adaptor.getSource().getType());
if (vType.getRank() != 1)
return failure();

Expand All @@ -1890,11 +1890,11 @@ struct LowerVectorExtractStridedSliceOpAIE2Pattern
auto bottomHalf = rewriter
.create<aievec::ExtOp>(
extractOp.getLoc(), shortVecType,
adaptor.getVector(), rewriter.getI8IntegerAttr(0))
adaptor.getSource(), rewriter.getI8IntegerAttr(0))
.getResult();
auto topHalf = rewriter
.create<aievec::ExtOp>(extractOp.getLoc(), shortVecType,
adaptor.getVector(),
adaptor.getSource(),
rewriter.getI8IntegerAttr(1))
.getResult();
int64_t offset = cast<IntegerAttr>(adaptor.getOffsets()[0]).getInt();
Expand Down
2 changes: 1 addition & 1 deletion python/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pybind11>=2.9.0, <=2.10.3
setuptools>=61.0
wheel
pre-commit
nanobind>=2.5
nanobind>=2.9
lit
matplotlib
# lit requires psutil to set timeouts
Expand Down
4 changes: 2 additions & 2 deletions python/requirements_extras.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This can't go in the normal requirements file because the way the wheels build parses requirements.txt
# does not support github packages
git+https://github.com/makslevental/mlir-python-extras@ba2e6fe
-f https://github.com/llvm/eudsl/releases/expanded_assets/latest

-e ./third_party/mlir-python-extras -f https://github.com/llvm/eudsl/releases/expanded_assets/latest
1 change: 1 addition & 0 deletions third_party/mlir-python-extras
Submodule mlir-python-extras added at a80185
4 changes: 2 additions & 2 deletions utils/clone-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
##===----------------------------------------------------------------------===##

# The LLVM commit to use.
LLVM_PROJECT_COMMIT=064f02dac0c81c19350a74415b3245f42fed09dc
DATETIME=2025090500
LLVM_PROJECT_COMMIT=37637120af80672002a97c330077e31df7432261
DATETIME=2025100118
WHEEL_VERSION=22.0.0.$DATETIME+${LLVM_PROJECT_COMMIT:0:8}

############################################################################################
Expand Down
Loading