Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[BACKEND] Update llvm to llvm/llvm-project@f142f8afe2 (#4619)" #4624

Merged
merged 1 commit into from
Aug 31, 2024
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
2 changes: 1 addition & 1 deletion cmake/llvm-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f142f8afe21bceb00fb495468aa0b5043e98c419
1115dee248e68a155001ac3712a189299d104863
2 changes: 1 addition & 1 deletion include/triton/Analysis/Alias.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SharedMemoryAliasAnalysis
}

/// Computes if the alloc set of the results are changed.
LogicalResult
void
visitOperation(Operation *op,
ArrayRef<const dataflow::Lattice<AliasInfo> *> operands,
ArrayRef<dataflow::Lattice<AliasInfo> *> results) override;
Expand Down
9 changes: 3 additions & 6 deletions lib/Analysis/Alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AliasInfo AliasInfo::join(const AliasInfo &lhs, const AliasInfo &rhs) {
return ret;
}

LogicalResult SharedMemoryAliasAnalysis::visitOperation(
void SharedMemoryAliasAnalysis::visitOperation(
Operation *op, ArrayRef<const dataflow::Lattice<AliasInfo> *> operands,
ArrayRef<dataflow::Lattice<AliasInfo> *> results) {
AliasInfo aliasInfo;
Expand All @@ -31,7 +31,7 @@ LogicalResult SharedMemoryAliasAnalysis::visitOperation(
if (auto memdescTy = dyn_cast<triton::MemDescType>(result.getType())) {
if (!isa_and_nonnull<triton::gpu::SharedMemorySpaceAttr>(
memdescTy.getMemorySpace()))
return success();
return;
}

// Only LocalAllocOp creates a new buffer.
Expand All @@ -49,14 +49,11 @@ LogicalResult SharedMemoryAliasAnalysis::visitOperation(
}

if (pessimistic) {
setAllToEntryStates(results);
return success();
return setAllToEntryStates(results);
}
// Join all lattice elements
for (auto *result : results)
propagateIfChanged(result, result->join(aliasInfo));

return success();
}

AliasResult SharedMemoryAliasAnalysis::alias(Value lhs, Value rhs) {
Expand Down
16 changes: 6 additions & 10 deletions lib/Analysis/AxisInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ class AxisInfoAnalysis : public dataflow::SparseForwardDataFlowAnalysis<
dataflow::Lattice<AxisInfo>>::getLatticeElement;
using FuncAxisInfoMapT = DenseMap<FunctionOpInterface, AxisInfo>;

LogicalResult
visitOperation(Operation *op,
ArrayRef<const dataflow::Lattice<AxisInfo> *> operands,
ArrayRef<dataflow::Lattice<AxisInfo> *> results) override;
void visitOperation(Operation *op,
ArrayRef<const dataflow::Lattice<AxisInfo> *> operands,
ArrayRef<dataflow::Lattice<AxisInfo> *> results) override;
void
visitForOpInductionVar(scf::ForOp op,
ArrayRef<dataflow::Lattice<AxisInfo> *> argLattices);
Expand Down Expand Up @@ -1040,7 +1039,7 @@ AxisInfoAnalysis::AxisInfoAnalysis(DataFlowSolver &solver)
visitors.append<LoadOpAxisInfoVisitor>();
}

LogicalResult AxisInfoAnalysis::visitOperation(
void AxisInfoAnalysis::visitOperation(
Operation *op, ArrayRef<const dataflow::Lattice<AxisInfo> *> operands,
ArrayRef<dataflow::Lattice<AxisInfo> *> results) {
// TODO: For sure not the right way to do this
Expand All @@ -1049,10 +1048,8 @@ LogicalResult AxisInfoAnalysis::visitOperation(
if (op->getValue().getRank() == 0)
setToEntryState((dataflow::Lattice<AxisInfo> *)op);
AxisInfo curr = visitors.apply(op, operands);
if (curr.getRank() == 0) {
setAllToEntryStates(results);
return success();
}
if (curr.getRank() == 0)
return setAllToEntryStates(results);
// override with hint
auto newContiguity = curr.getContiguity();
auto newDivisibility = curr.getDivisibility();
Expand All @@ -1074,7 +1071,6 @@ LogicalResult AxisInfoAnalysis::visitOperation(
// join all lattice elements
for (auto *result : results)
propagateIfChanged(result, result->join(curr));
return success();
}

void AxisInfoAnalysis::visitForOpInductionVar(
Expand Down
2 changes: 0 additions & 2 deletions python/src/ir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "mlir/Dialect/Index/IR/IndexDialect.h"
#include "mlir/Dialect/Index/IR/IndexOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Diagnostics.h"
Expand Down Expand Up @@ -227,7 +226,6 @@ void init_triton_ir(py::module &&m) {
cf::ControlFlowDialect, LLVM::LLVMDialect>();
registerBuiltinDialectTranslation(registry);
registerLLVMDialectTranslation(registry);
mlir::LLVM::registerInlinerInterface(registry);
context.appendDialectRegistry(registry);
context.loadAllAvailableDialects();
});
Expand Down
Loading