Skip to content

Commit 5b2d42b

Browse files
authored
Merge branch 'main' into dev/wdziurdz/test-matmul-1
2 parents 91f9536 + c0e155d commit 5b2d42b

File tree

159 files changed

+7023
-4668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7023
-4668
lines changed

.github/workflows/integration-tests-amd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
integration-tests-amd:
1414
runs-on: ${{ matrix.runner }}
1515
timeout-minutes: 45
16+
continue-on-error: ${{ matrix.runner[1] == 'gfx90a' }}
1617
strategy:
1718
matrix:
1819
runner: ${{ fromJson(inputs.matrix) }}

.github/workflows/llvm-build.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
-DLLVM_BUILD_UTILS=ON
107107
-DLLVM_BUILD_TOOLS=ON
108108
-DLLVM_ENABLE_ASSERTIONS=ON
109-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON
109+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF
110110
-DLLVM_ENABLE_PROJECTS="mlir;lld"
111111
-DLLVM_INSTALL_UTILS=ON
112112
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
@@ -130,7 +130,7 @@ jobs:
130130
-DLLVM_BUILD_UTILS=ON
131131
-DLLVM_BUILD_TOOLS=ON
132132
-DLLVM_ENABLE_ASSERTIONS=ON
133-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON
133+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF
134134
-DLLVM_ENABLE_PROJECTS="mlir;llvm;lld"
135135
-DLLVM_ENABLE_DIA_SDK=OFF
136136
-DLLVM_INSTALL_UTILS=ON
@@ -179,7 +179,7 @@ jobs:
179179
-DCLANG_TABLEGEN=$HOST_TOOLS/clang-tblgen \
180180
-DLLVM_ENABLE_ASSERTIONS=ON \
181181
-DCMAKE_LINKER=$LINKER \
182-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
182+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF \
183183
-DLLVM_ENABLE_ZSTD=OFF \
184184
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF \
185185
-DLLVM_INSTALL_UTILS=ON \
@@ -202,12 +202,6 @@ jobs:
202202
-DLLVM_ENABLE_TERMINFO=OFF \
203203
llvm-project/llvm
204204
ninja -C llvm-project/build install
205-
CURR_PWD="$(pwd)"
206-
cd "${{ env.llvm_install_dir }}/python_packages/mlir_core/mlir/_mlir_libs/"
207-
for file in *x86_64*; do
208-
mv "$file" "${file/x86_64/aarch64}"
209-
done
210-
cd $CURR_PWD
211205
tar czf "${{ env.llvm_install_dir }}.tar.gz" "${{ env.llvm_install_dir }}"
212206
213207
- name: Configure, Build, and Install LLVM (macOS arm64)
@@ -225,7 +219,7 @@ jobs:
225219
-DLLVM_BUILD_UTILS=ON
226220
-DLLVM_BUILD_TOOLS=ON
227221
-DLLVM_ENABLE_ASSERTIONS=ON
228-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON
222+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF
229223
-DLLVM_ENABLE_PROJECTS="mlir;lld"
230224
-DLLVM_ENABLE_ZSTD=OFF
231225
-DLLVM_INSTALL_UTILS=ON

.github/workflows/llvm-build/almalinux.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN cmake -GNinja -Bbuild \
2929
-DLLVM_BUILD_UTILS=ON \
3030
-DLLVM_BUILD_TOOLS=ON \
3131
-DLLVM_ENABLE_ASSERTIONS=ON \
32-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
32+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF \
3333
-DLLVM_ENABLE_PROJECTS="mlir;lld" \
3434
-DLLVM_ENABLE_TERMINFO=OFF \
3535
-DLLVM_INSTALL_UTILS=ON \

.github/workflows/llvm-build/centos.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN cmake -GNinja -Bbuild \
4646
-DLLVM_BUILD_UTILS=ON \
4747
-DLLVM_BUILD_TOOLS=ON \
4848
-DLLVM_ENABLE_ASSERTIONS=ON \
49-
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
49+
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF \
5050
-DLLVM_ENABLE_PROJECTS="mlir;lld" \
5151
-DLLVM_ENABLE_TERMINFO=OFF \
5252
-DLLVM_INSTALL_UTILS=ON \

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ if(NOT CMAKE_BUILD_TYPE)
8989
set(CMAKE_BUILD_TYPE "Release")
9090
endif()
9191

92-
if(NOT WIN32)
93-
find_library(TERMINFO_LIBRARY tinfo)
94-
endif()
95-
9692
if(TRITON_BUILD_UT)
9793
# This is an aggregate target for all unit tests.
9894
add_custom_target(TritonUnitTests)

cmake/llvm-hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
064f02dac0c81c19350a74415b3245f42fed09dc
1+
f6ded0be897e2878612dd903f7e8bb85448269e5

include/triton/Conversion/TritonGPUToLLVM/Utility.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -528,32 +528,6 @@ Value emitPadding(Location loc, RewriterBase &rewriter,
528528
triton::gpu::PaddedSharedEncodingAttr layout,
529529
unsigned bitwidth, Value smemOffset, bool offsetInBytes);
530530

531-
// Emits IR to load data from shared memory into registers, or to store data
532-
// from registers into shared memory.
533-
//
534-
// You supply perVectorCallback, which is called once per group of register
535-
// elements to transfer. You can use this callback to emit IR to load or store
536-
// data from or to shared memory.
537-
//
538-
// elemLlvmTy should be dstTy's element type converted to an LLVM-dialect type.
539-
//
540-
// If maxVecElems is provided, we won't vectorize more than this many elements.
541-
//
542-
// Returns true on success.
543-
[[nodiscard]] bool emitTransferBetweenRegistersAndShared(
544-
RankedTensorType registerTy, triton::gpu::MemDescType sharedTy,
545-
Type elemLlvmTy, std::optional<int32_t> maxVecElems,
546-
const SharedMemoryObject &smemObj, Location loc, RewriterBase &rewriter,
547-
const TargetInfoBase &target,
548-
std::function<void(VectorType, Value /*shmemAddr*/)> perVectorCallback);
549-
550-
[[nodiscard]] bool emitTransferBetweenRegistersAndShared(
551-
LinearLayout &regLayout, triton::gpu::MemDescType sharedTy, Type elemLlvmTy,
552-
std::optional<int32_t> maxVecElems, const SharedMemoryObject &smemObj,
553-
Location loc, RewriterBase &rewriter, const TargetInfoBase &target,
554-
Value laneId, Value warpId,
555-
std::function<void(VectorType, Value /*shmemAddr*/)> perVectorCallback);
556-
557531
// Close cousin of lowerLdStMatrix in MemoryOpToLLVM.cpp
558532
// We might want to merge them at some point, but having to support
559533
// ldmatrix.trans makes the code in lowerLdStMatrix a bit specific

include/triton/Dialect/Gluon/Transforms/Passes.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,14 @@ def GluonInline: Pass<"gluon-inline"> {
3535
let dependentDialects = [];
3636
}
3737

38+
def GluonSimplifyControlFlow: Pass<"gluon-slimplify-control-flow"> {
39+
let summary = "simplications for control flow ops";
40+
41+
let description = [{
42+
The `gluon-inline` pass applies a reduced set of simplification
43+
and canonicalization patterns to the module.
44+
}];
45+
let dependentDialects = [];
46+
}
47+
3848
#endif

include/triton/Dialect/TritonGPU/IR/LinearLayoutConversions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ LinearLayout chooseScaledMfmaScaleLayout(MLIRContext *ctx, int dotOperandIdx,
135135
ArrayRef<unsigned> tilesPerWarp,
136136
ArrayRef<unsigned> warpsPerCTA);
137137

138+
LinearLayout chooseScaledWmmaScaleLayout(
139+
MLIRContext *ctx, int dotOperandIdx,
140+
const std::vector<std::vector<int32_t>> &dotOperandWarpBasis,
141+
ArrayRef<int64_t> dotOperandShape);
142+
138143
LinearLayout getSM120DotScaledScaleLayout(MLIRContext *ctx, int dotOperandIdx,
139144
ArrayRef<int64_t> dotOperandShape,
140145
ArrayRef<unsigned> tilesPerWarp,

include/triton/Dialect/TritonGPU/IR/TritonGPUAttrDefs.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,8 +1307,7 @@ Row |
13071307
let hasCustomAssemblyFormat = 1;
13081308

13091309
let extraClassDeclaration = extraDistributedDeclaration # [{
1310-
SmallVector<int64_t> getRepForOperand(ArrayRef<int64_t> operandShape,
1311-
Type elemType, int opIdx) const;
1310+
SmallVector<int64_t> getRepForOperand(ArrayRef<int64_t> operandShape, int kDim, int opIdx) const;
13121311
SmallVector<unsigned> getRepOrderForOperand(int opIdx) const;
13131312

13141313
static SmallVector<unsigned, 3> getDefaultInstrShape() {

0 commit comments

Comments
 (0)