mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-27 03:01:52 -04:00
upgrade llvm to b1115f8c (NFC) (#2403)
Co-authored-by: Thomas Raoux <thomas.raoux@openai.com> Co-authored-by: Keren Zhou <kerenzhou@openai.com> Co-authored-by: Phil Tillet <phil@openai.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/IR/BuiltinAttributes.h"
|
||||
#include "mlir/IR/BuiltinTypes.h"
|
||||
#include "mlir/IR/FunctionImplementation.h"
|
||||
#include "mlir/IR/FunctionInterfaces.h"
|
||||
#include "mlir/IR/OperationSupport.h"
|
||||
#include "mlir/Interfaces/FunctionImplementation.h"
|
||||
#include "mlir/Interfaces/FunctionInterfaces.h"
|
||||
#include "triton/Dialect/Triton/IR/Dialect.h"
|
||||
#include "triton/Dialect/Triton/IR/Types.h"
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ add_mlir_dialect_library(TritonGPUIR
|
||||
TritonGPUAttrDefsIncGen
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRGPUOps
|
||||
MLIRGPUDialect
|
||||
TritonIR
|
||||
)
|
||||
|
||||
@@ -1360,7 +1360,7 @@ ParseResult parseInsertSliceOp(OpAsmParser &parser, OperationState &result) {
|
||||
result.operands))
|
||||
return failure();
|
||||
|
||||
// Deduce operand_segment_sizes from the number of the operands.
|
||||
// Deduce operandSegmentSizes from the number of the operands.
|
||||
auto operandSegmentSizesAttrName =
|
||||
OpT::getOperandSegmentSizesAttrName(result.name);
|
||||
result.addAttribute(
|
||||
@@ -1373,7 +1373,7 @@ template <class OpT>
|
||||
void printInsertSliceOp(OpAsmPrinter &printer, OpT insertSliceOp) {
|
||||
printer << " ";
|
||||
printer << insertSliceOp.getOperation()->getOperands();
|
||||
// "operand_segment_sizes" can be deduced, so we don't print it.
|
||||
// "operandSegmentSizes" can be deduced, so we don't print it.
|
||||
printer.printOptionalAttrDict(
|
||||
insertSliceOp->getAttrs(),
|
||||
{insertSliceOp.getOperandSegmentSizesAttrName()});
|
||||
|
||||
@@ -117,7 +117,10 @@ class BlockedToMMA : public mlir::RewritePattern {
|
||||
int finalBitWidth = getElementTypeOrSelf(x).getIntOrFloatBitWidth();
|
||||
int origBitWidth = finalBitWidth;
|
||||
SetVector<Operation *> slice;
|
||||
mlir::getBackwardSlice(x, &slice, bwdFilter);
|
||||
mlir::BackwardSliceOptions opt;
|
||||
opt.omitBlockArguments = true;
|
||||
opt.filter = bwdFilter;
|
||||
getBackwardSlice(x, &slice, opt);
|
||||
Operation *firstOp = slice.empty() ? nullptr : *slice.begin();
|
||||
if (firstOp)
|
||||
if (Value arg = firstOp->getOperand(0))
|
||||
@@ -213,8 +216,11 @@ public:
|
||||
if (versionMajor == 1) {
|
||||
SetVector<Operation *> aBwdSlices, bBwdSlices;
|
||||
auto isCvt = [](Operation *op) { return isa<ConvertLayoutOp>(op); };
|
||||
getBackwardSlice(a, &aBwdSlices, {isCvt});
|
||||
getBackwardSlice(b, &bBwdSlices, {isCvt});
|
||||
mlir::BackwardSliceOptions opt;
|
||||
opt.omitBlockArguments = true;
|
||||
opt.filter = isCvt;
|
||||
getBackwardSlice(a, &aBwdSlices, opt);
|
||||
getBackwardSlice(b, &bBwdSlices, opt);
|
||||
// get the source of the first conversion found in slices
|
||||
auto getCvtArgOrder = [](Operation *op) {
|
||||
return cast<ConvertLayoutOp>(op)
|
||||
|
||||
@@ -98,7 +98,9 @@ public:
|
||||
// and all operations between the load and the conversion
|
||||
// should be layout preserving
|
||||
SetVector<Operation *> slice;
|
||||
getBackwardSlice(op, &slice);
|
||||
mlir::BackwardSliceOptions opt;
|
||||
opt.omitBlockArguments = true;
|
||||
getBackwardSlice(op, &slice, opt);
|
||||
int loadIdx = -1;
|
||||
bool checkOp = false;
|
||||
for (int i = 0; i < slice.size(); i++) {
|
||||
|
||||
@@ -91,7 +91,7 @@ private:
|
||||
// suport ForOp only
|
||||
if (auto forOp = dyn_cast<scf::ForOp>(argOwner)) {
|
||||
// prologue
|
||||
auto iterOperands = forOp.getIterOperands();
|
||||
auto iterOperands = forOp.getInitArgs();
|
||||
if (argNum == 0)
|
||||
return false;
|
||||
if (dependOnSharedEncOperand(iterOperands[argNum - 1]))
|
||||
|
||||
@@ -628,12 +628,13 @@ bool CTAPlanner::isElementwiseOp(Operation *op) const {
|
||||
arith::CeilDivUIOp, arith::DivFOp, arith::DivSIOp,
|
||||
arith::DivUIOp, arith::ExtFOp, arith::ExtSIOp, arith::ExtUIOp,
|
||||
arith::FloorDivSIOp, arith::FPToSIOp, arith::FPToUIOp,
|
||||
arith::MaxFOp, arith::MaxSIOp, arith::MaxUIOp, arith::MinFOp,
|
||||
arith::MinSIOp, arith::MinUIOp, arith::MulFOp, arith::MulIOp,
|
||||
arith::NegFOp, arith::OrIOp, arith::RemFOp, arith::RemSIOp,
|
||||
arith::RemUIOp, arith::ShLIOp, arith::ShRSIOp, arith::ShRUIOp,
|
||||
arith::SIToFPOp, arith::SubFOp, arith::SubIOp, arith::TruncFOp,
|
||||
arith::TruncIOp, arith::UIToFPOp, arith::XOrIOp>(op))
|
||||
arith::MaximumFOp, arith::MaxSIOp, arith::MaxUIOp,
|
||||
arith::MinimumFOp, arith::MinSIOp, arith::MinUIOp,
|
||||
arith::MulFOp, arith::MulIOp, arith::NegFOp, arith::OrIOp,
|
||||
arith::RemFOp, arith::RemSIOp, arith::RemUIOp, arith::ShLIOp,
|
||||
arith::ShRSIOp, arith::ShRUIOp, arith::SIToFPOp, arith::SubFOp,
|
||||
arith::SubIOp, arith::TruncFOp, arith::TruncIOp,
|
||||
arith::UIToFPOp, arith::XOrIOp>(op))
|
||||
return true;
|
||||
if (llvm::isa<math::AbsFOp, math::AbsIOp, math::AtanOp, math::Atan2Op,
|
||||
math::CeilOp, math::CopySignOp, math::CosOp, math::SinOp,
|
||||
|
||||
@@ -220,7 +220,9 @@ public:
|
||||
SetVector<Operation *> backwardSlice;
|
||||
mod.walk([&](triton::MakeTensorPtrOp op) -> void {
|
||||
assert(isa<triton::FuncOp>(op->getParentOp()));
|
||||
getBackwardSlice(op.getOperation(), &backwardSlice);
|
||||
mlir::BackwardSliceOptions opt;
|
||||
opt.omitBlockArguments = true;
|
||||
getBackwardSlice(op.getOperation(), &backwardSlice, opt);
|
||||
op->removeAttr("async_agent");
|
||||
});
|
||||
for (auto op : backwardSlice) {
|
||||
|
||||
@@ -259,7 +259,7 @@ scf::ForOp createNewMathLoop(scf::ForOp forOp, int numStages,
|
||||
|
||||
// 3. create newLoopArgs
|
||||
SmallVector<Value> newLoopArgs;
|
||||
for (auto operand : forOp.getIterOperands())
|
||||
for (auto operand : forOp.getInitArgs())
|
||||
newLoopArgs.push_back(operand);
|
||||
|
||||
builder.setInsertionPoint(forOp);
|
||||
|
||||
Reference in New Issue
Block a user