Skip to content

Commit

Permalink
Migrate to llvm version 19.1.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix-Rm committed Oct 30, 2024
1 parent 105bfaa commit 426c819
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cinnamon/include/cinm-mlir/Dialect/UPMEM/IR/UPMEMOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include "mlir/IR/RegionKindInterface.td"

class UPMEM_IndexOp<string mnemonic, list<Trait> traits = []> :
UPMEM_Op<mnemonic, !listconcat(traits, [
Pure, DeclareOpInterfaceMethods<InferIntRangeInterface>])>,
Pure, DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>])>,
Results<(outs Index)> {
let assemblyFormat = "attr-dict";
}
Expand Down Expand Up @@ -128,7 +128,7 @@ def UPMEM_PrivateWRAMAllocOp : UPMEM_Op<"pwram_alloc", [
def UPMEM_LaunchOp : UPMEM_Op<"launch", [
AutomaticAllocationScope, AttrSizedOperandSegments, UPMEM_AsyncOpInterface,
IsolatedFromAbove,
DeclareOpInterfaceMethods<InferIntRangeInterface>]> {
DeclareOpInterfaceMethods<InferIntRangeInterface, ["inferResultRanges"]>]> {
let summary = "UPMEM kernel launch operation";

let arguments = (ins
Expand Down
1 change: 0 additions & 1 deletion cinnamon/lib/Conversion/CnmToGPU/CnmToGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ struct ConvertCnmToGPUPass

RewritePatternSet patterns(&getContext());
populateCnmToGPUConversionPatterns(patterns, &getContext());
populateReconcileUnrealizedCastsPatterns(patterns);

ConversionTarget target(getContext());
target.addIllegalDialect<cnm::CnmDialect>();
Expand Down
2 changes: 1 addition & 1 deletion cinnamon/lib/Conversion/CnmToUPMEM/CnmToUPMEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <mlir/IR/ValueRange.h>
#include <mlir/Support/LLVM.h>
#include <mlir/Transforms/DialectConversion.h>
#include <mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h>

#define GEN_PASS_DEF_CONVERTCNMTOUPMEMPASS
#include "cinm-mlir/Conversion/CnmPasses.h.inc"
Expand Down Expand Up @@ -355,7 +356,6 @@ struct ConvertCnmToUPMEMPass

RewritePatternSet patterns(&getContext());
populateCnmToUPMEMConversionPatterns(converter, patterns);
populateReconcileUnrealizedCastsPatterns(patterns);
populateFinalBufferizationPatterns(patterns);

ConversionTarget target(getContext());
Expand Down
4 changes: 2 additions & 2 deletions cinnamon/lib/Conversion/UPMEMToLLVM/UPMEMToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <mlir/IR/Visitors.h>
#include <mlir/Support/LogicalResult.h>
#include <mlir/Transforms/DialectConversion.h>
#include <mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h>
#include <optional>

namespace mlir {
Expand Down Expand Up @@ -315,7 +316,7 @@ outlineAffineMap(ImplicitLocOpBuilder &rewriter,
affineMapFun->setAttr("upmem.generated_from", AffineMapAttr::get(*linearMap));

rewriter = ImplicitLocOpBuilder::atBlockBegin(rewriter.getLoc(),
affineMapFun.addEntryBlock());
affineMapFun.addEntryBlock(rewriter));
Value arg = affineMapFun.getArgument(0);
// affine expects to deal with index type only
arg = createOrFoldUnrealizedConversionCast(rewriter.getLoc(), rewriter,
Expand Down Expand Up @@ -570,7 +571,6 @@ struct ConvertUPMEMToLLVMPass
RewritePatternSet patterns(&getContext());
populateFinalizeMemRefToLLVMConversionPatterns(converter, patterns);
populateUPMEMToLLVMConversionPatterns(converter, patterns);
populateReconcileUnrealizedCastsPatterns(patterns);

ConversionTarget target(getContext());
target.addIllegalDialect<upmem::UPMEMDialect>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void CnmSPIRVAttachKernelEntryPointAttributePass::runOnOperation() {
const DenseI32ArrayAttr workgroup_size = DenseI32ArrayAttr::get(&getContext(), {1, 1, 1});
const std::optional<int> subgroup_size;

gpuFunc->setAttr("spirv.entry_point_abi", spirv::EntryPointABIAttr::get(&getContext(), workgroup_size, subgroup_size));
gpuFunc->setAttr("spirv.entry_point_abi", spirv::EntryPointABIAttr::get(&getContext(), workgroup_size, subgroup_size, {}));
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ static std::optional<uint64_t> getKnownLaunchDim(Op op, LaunchDims type) {
return std::nullopt;
}


void RankDimOp::inferResultRanges(ArrayRef<ConstantIntRanges>,
SetIntRangeFn setResultRange) {
uint64_t max = getKnownLaunchDim(*this, LaunchDims::Rank).value_or(kMaxRankDim);
Expand Down

0 comments on commit 426c819

Please sign in to comment.