Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into amd-shared-ll
Browse files Browse the repository at this point in the history
  • Loading branch information
antiagainst committed Feb 25, 2025
2 parents 974a59f + 47e4090 commit 431cb45
Show file tree
Hide file tree
Showing 79 changed files with 3,756 additions and 2,513 deletions.
4 changes: 4 additions & 0 deletions bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ target_link_libraries(triton-opt PRIVATE
# tests
TritonTestAnalysis
TritonTestDialectTritonGPU
TritonAMDGPUTestAnalysis
# MLIR core
MLIROptLib
MLIRPass
Expand All @@ -32,6 +33,7 @@ target_link_libraries(triton-reduce PRIVATE
# tests
TritonTestAnalysis
TritonTestDialectTritonGPU
TritonAMDGPUTestAnalysis
# MLIR core
MLIRReduceLib
MLIRPass
Expand All @@ -50,6 +52,7 @@ target_link_libraries(triton-lsp PRIVATE
# tests
TritonTestAnalysis
TritonTestDialectTritonGPU
TritonAMDGPUTestAnalysis
# MLIR core
MLIRLspServerLib
MLIRPass
Expand Down Expand Up @@ -86,4 +89,5 @@ target_link_libraries(triton-tensor-layout PRIVATE
${dialect_libs}
TritonTestAnalysis
TritonTestDialectTritonGPU
TritonAMDGPUTestAnalysis
)
2 changes: 2 additions & 0 deletions bin/RegisterTritonDialects.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void registerTestAliasPass();
void registerTestAlignmentPass();
void registerTestAllocationPass();
void registerTestMembarPass();
void registerTestTritonAMDGPURangeAnalysis();
} // namespace test
} // namespace mlir

Expand All @@ -44,6 +45,7 @@ inline void registerTritonDialects(mlir::DialectRegistry &registry) {
mlir::test::registerTestAlignmentPass();
mlir::test::registerTestAllocationPass();
mlir::test::registerTestMembarPass();
mlir::test::registerTestTritonAMDGPURangeAnalysis();
mlir::triton::registerConvertTritonToTritonGPUPass();
mlir::triton::registerAllocateSharedMemoryPass();
mlir::triton::registerTritonGPUGlobalScratchAllocationPass();
Expand Down
2 changes: 0 additions & 2 deletions include/triton/Analysis/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ bool cvtNeedsSharedMemory(RankedTensorType srcTy, RankedTensorType dstTy);

bool atomicNeedsSharedMemory(Value result);

bool isBlockedToDotShortcut(RankedTensorType srcTy, RankedTensorType dstTy);

// Return true if the src and dst layout match.
bool matchMmaV3AndDotOperandLayout(RankedTensorType srcTy,
RankedTensorType dstTy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ElementwiseOpConversionBase : public ConvertOpToLLVMPattern<SourceOp> {
if (!axisInfo)
// axis info (e.g., constancy) not available
return resultVals;
SmallVector<unsigned> contigPerThread = getContigPerThread(encoding);
SmallVector<unsigned> contigPerThread = getContigPerThread(rtType);
if (rank != contigPerThread.size())
return resultVals;

Expand Down Expand Up @@ -135,7 +135,7 @@ class ElementwiseOpConversionBase : public ConvertOpToLLVMPattern<SourceOp> {
if (rank > 1) {
// reorder the shape and constancy vectors by the axis order:
// from the fastest-changing to the smallest-changing axis
SmallVector<unsigned> order = getOrder(encoding);
SmallVector<unsigned> order = getOrder(rtType);
if (rank != order.size())
return resultVals;
elemsPerThread = applyPermutation(elemsPerThread, order);
Expand Down
2 changes: 2 additions & 0 deletions include/triton/Conversion/TritonGPUToLLVM/TargetInfoBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ class TargetInfoBase {

virtual int getSharedAddressSpace() const = 0;

virtual int getAddressSpace(Attribute addressSpace) const = 0;

virtual bool supportVectorizedAtomics() const = 0;

// Helper used by targets to annotate local load/store operations during
Expand Down
Loading

0 comments on commit 431cb45

Please sign in to comment.