Skip to content

Commit 041e2da

Browse files
committed
Merge branch 'main' into etiotto/coalesce_for_block_ptr
2 parents 049ddb8 + 700abe3 commit 041e2da

File tree

84 files changed

+3213
-563
lines changed

Some content is hidden

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

84 files changed

+3213
-563
lines changed

.github/pins/pytorch-upstream.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0a2685160140656e3e53818611dd2c65c4397be5
1+
8321eec009c8c79145ebccd51fdfc336e5f8b848

.github/workflows/build-test-reusable.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ jobs:
159159
echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
160160
161161
- name: Install transformers
162-
if: ${{ inputs.python_version != '3.12' }}
163162
uses: ./.github/actions/install-dependency
164163
with:
165164
package: transformers
@@ -168,7 +167,6 @@ jobs:
168167
try-tag-prefix: v
169168

170169
- name: Run E2E test
171-
if: ${{ inputs.python_version != '3.12' }}
172170
run: |
173171
# Set WORKSPACE for inductor_xpu_test.sh to make sure it creates "inductor_log" outside of pytorch cloned directory
174172
export WORKSPACE=$GITHUB_WORKSPACE

.github/workflows/llvm-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
-DLLVM_INSTALL_UTILS=ON
108108
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
109109
-DLLVM_ENABLE_TERMINFO=OFF
110-
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
111110
llvm-project/llvm
112111
113112
ninja -C llvm-project/build check-mlir install
@@ -131,7 +130,6 @@ jobs:
131130
-DLLVM_INSTALL_UTILS=ON
132131
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
133132
-DLLVM_ENABLE_TERMINFO=OFF
134-
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
135133
llvm-project/llvm
136134
137135
ninja -C llvm-project/build check-mlir install

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ RUN cmake -GNinja -Bbuild \
3333
-DLLVM_ENABLE_PROJECTS=mlir \
3434
-DLLVM_ENABLE_TERMINFO=OFF \
3535
-DLLVM_INSTALL_UTILS=ON \
36-
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF \
3736
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \
3837
/source/llvm-project/llvm
3938

.github/workflows/triton-benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
source ../../scripts/capture-hw-details.sh
168168
169169
python ../../scripts/build_report.py $REPORTS/matmul-performance-bt.csv $REPORTS/gemm-bt-triton-report.csv --benchmark gemm-bt --compiler triton --param_cols "B,M,K,N" --tflops_col Triton-TFlops --hbm_col "Triton-GB/s" --tag $TAG
170-
python ../../scripts/build_report.py $REPORTS/matmul-performance-bt.csv $REPORTS/gemm-bt-triton-report.csv --benchmark gemm-bt --compiler onednn --param_cols "B,M,K,N" --tflops_col onednn-TFlops --hbm_col "onednn-GB/s" --tag $TAG
170+
python ../../scripts/build_report.py $REPORTS/matmul-performance-bt.csv $REPORTS/gemm-bt-onednn-report.csv --benchmark gemm-bt --compiler onednn --param_cols "B,M,K,N" --tflops_col onednn-TFlops --hbm_col "onednn-GB/s" --tag $TAG
171171
172172
- name: Run Triton GEMM (A^t@B) kernel benchmark
173173
if: ${{ steps.install.outcome == 'success' && !cancelled() }}
@@ -178,7 +178,7 @@ jobs:
178178
source ../../scripts/capture-hw-details.sh
179179
180180
python ../../scripts/build_report.py $REPORTS/matmul-performance-at.csv $REPORTS/gemm-at-triton-report.csv --benchmark gemm-at --compiler triton --param_cols "B,M,K,N" --tflops_col Triton-TFlops --hbm_col "Triton-GB/s" --tag $TAG
181-
python ../../scripts/build_report.py $REPORTS/matmul-performance-at.csv $REPORTS/gemm-at-triton-report.csv --benchmark gemm-at --compiler onednn --param_cols "B,M,K,N" --tflops_col onednn-TFlops --hbm_col "onednn-GB/s" --tag $TAG
181+
python ../../scripts/build_report.py $REPORTS/matmul-performance-at.csv $REPORTS/gemm-at-onednn-report.csv --benchmark gemm-at --compiler onednn --param_cols "B,M,K,N" --tflops_col onednn-TFlops --hbm_col "onednn-GB/s" --tag $TAG
182182
183183
- name: Run Triton GEMM (stream-k) kernel benchmark
184184
if: ${{ steps.install.outcome == 'success' && !cancelled() }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ build-*/
66
python/build/
77
python/dist/
88
python/triton*.egg-info/
9+
python/*.whl
910

1011
python/triton/_C/*.pyd
1112
python/triton/_C/*.so
1213
python/triton/_C/*.dylib
1314

15+
benchmarks/dist
16+
benchmarks/*.egg-info/
17+
benchmarks/**/*.so
18+
19+
# Logs
20+
inductor_log/
21+
1422
# Backends copied from submodules
1523
python/triton/backends/
1624
!python/triton/backends/__init__.py

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: ruff
2323
files: '^python/.*'
2424
args: ["--fix", "--line-length", "120"]
25-
stages: [commit, push, manual]
25+
stages: [pre-commit, pre-push, manual]
2626
exclude: |
2727
(?x)(
2828
^python/triton/runtime/.*|
@@ -35,14 +35,14 @@ repos:
3535
hooks:
3636
- id: yapf
3737
args: ["-p", "-i"]
38-
stages: [commit, push, manual]
38+
stages: [pre-commit, pre-push, manual]
3939
exclude: "python/test/unit/language/test_line_info.py"
4040

4141
- repo: https://github.com/pre-commit/mirrors-clang-format
4242
rev: v16.0.6
4343
hooks:
4444
- id: clang-format
45-
stages: [commit, push, manual]
45+
stages: [pre-commit, pre-push, manual]
4646

4747
# Expand YAML anchors in files used by github workflows, because github can't
4848
# do this itself. This lets us use anchors, which avoids code duplication.
@@ -69,15 +69,15 @@ repos:
6969
- id: bandit
7070
files: '^(benchmarks|scripts|third_party/intel)/.*\.py$'
7171
args: ["-c", "bandit.yaml", "-s", "B404,B603,B607"]
72-
stages: [commit, push, manual]
72+
stages: [pre-commit, pre-push, manual]
7373

7474
- repo: https://github.com/astral-sh/ruff-pre-commit
7575
rev: v0.1.3
7676
hooks:
7777
- id: ruff
7878
files: '^(benchmarks|third_party/intel|scripts)/.*'
7979
args: ["--fix", "--line-length", "120"]
80-
stages: [commit, push, manual]
80+
stages: [pre-commit, pre-push, manual]
8181

8282
- repo: https://github.com/pycqa/pylint
8383
rev: v3.2.6
@@ -105,7 +105,7 @@ repos:
105105
- --disable=too-many-locals
106106
- --disable=too-many-statements
107107
- --disable=too-many-arguments
108-
stages: [commit, push, manual]
108+
stages: [pre-commit, pre-push, manual]
109109

110110
- id: pylint
111111
name: pylint for benchmarks
@@ -136,7 +136,7 @@ repos:
136136
- --disable=too-many-statements
137137
- --disable=too-many-arguments
138138
- --disable=fixme
139-
stages: [commit, push, manual]
139+
stages: [pre-commit, pre-push, manual]
140140

141141

142142
exclude: |

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ if(TRITON_BUILD_PYTHON_MODULE)
211211
MLIRSCFToControlFlow
212212
MLIRIndexToLLVM
213213
MLIRGPUToROCDLTransforms
214+
MLIRUBToLLVM
214215

215216
# LLVM
216217
LLVMPasses

benchmarks/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ if(NOT WIN32)
1010
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
1111
endif()
1212

13-
find_package(Python3 COMPONENTS Interpreter)
13+
find_package(Python3 REQUIRED
14+
COMPONENTS Development.Module)
1415
find_package(Torch REQUIRED)
1516
find_library(TORCH_PYTHON_LIBRARY torch_python PATH "${TORCH_INSTALL_PREFIX}/lib")
17+
find_package(XeTLALibrary REQUIRED)
1618

1719
if(USE_IPEX)
1820
string(APPEND CMAKE_CXX_FLAGS " -DUSE_IPEX")

benchmarks/cmake/FindXeTLALibrary.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
include(FetchContent)
44

55
if (NOT XeTLALibrary_FOUND)
6+
# TODO: switch ot FetchContent_MakeAvailable once XeTLA supports it
7+
cmake_policy(SET CMP0169 OLD)
68

79
set(XeTLALibrary_SOURCE_DIR
810
"${CMAKE_CURRENT_BINARY_DIR}/XeTLALibrary")
911
message(STATUS "XeTLALibrary is not specified. Will try to download
1012
XeTLA library from https://github.com/intel/xetla into
1113
${XeTLALibrary_SOURCE_DIR}")
12-
file(READ xetla-library.conf XeTLALibrary_TAG)
14+
file(READ xetla_kernel/xetla-library.conf XeTLALibrary_TAG)
1315
# Strip the potential trailing newline from tag
1416
string(STRIP "${XeTLALibrary_TAG}" XeTLALibrary_TAG)
1517
FetchContent_Declare(xetla-library

0 commit comments

Comments
 (0)