Skip to content

Commit badff43

Browse files
mritunjaymusaleMika Laitio
authored and
Mika Laitio
committed
added trition patch for cpu fix
Signed-off-by: mritunjaymusale <[email protected]>
1 parent 55dbf09 commit badff43

6 files changed

+42
-15
lines changed

patches/rocm-6.1.1/aotriton/0001-aotriton-rocm-home-dir-change.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ae27d084d624d1505c803abf13de43513a8a7515 Mon Sep 17 00:00:00 2001
1+
From 8ee78241c7c18a6c1941d8fd096194f2908ed9a3 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <[email protected]>
33
Date: Fri, 10 May 2024 17:05:37 -0700
4-
Subject: [PATCH 1/5] aotriton rocm home dir change
4+
Subject: [PATCH 1/6] aotriton rocm home dir change
55

66
- change the rocm sdk directory location
77
on all possible places
@@ -98,5 +98,5 @@ index 8117e5d..e0f2a57 100644
9898
per_kernel_targets = []
9999
for k in triton_kernels:
100100
--
101-
2.41.0
101+
2.45.1
102102

patches/rocm-6.1.1/aotriton/0002-aotriton-triton-rocm-home-path-update.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 17b889089291c11e108a3b7bb011ff6f32b3b99d Mon Sep 17 00:00:00 2001
1+
From 1183293bec9ce1cbcb579b5b47e9370eda34d9f2 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <[email protected]>
33
Date: Fri, 10 May 2024 17:06:25 -0700
4-
Subject: [PATCH 2/5] aotriton triton rocm home path update
4+
Subject: [PATCH 2/6] aotriton triton rocm home path update
55

66
- change the location of rocm_home
77
to triton subproject
@@ -150,5 +150,5 @@ index 60eaa30..c9df795 100755
150150
+cp $ROCM_HOME/llvm/bin/ld.lld $TRITON_ROCM_DIR/bin/
151151

152152
--
153-
2.41.0
153+
2.45.1
154154

patches/rocm-6.1.1/aotriton/0003-include-mutex-for-unique_lock-method.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 41a90751beb8dd59e60e4515ac56c7e3416b2a65 Mon Sep 17 00:00:00 2001
1+
From 82bf0251d5f91b453cc1701127d76507c6ef15bb Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <[email protected]>
33
Date: Tue, 14 May 2024 21:15:22 -0700
4-
Subject: [PATCH 3/5] include mutex for unique_lock method
4+
Subject: [PATCH 3/6] include mutex for unique_lock method
55

66
fixes following error from hipcc:
77

@@ -83,5 +83,5 @@ index 0f96477..84a38ce 100644
8383
#include <zstd.h>
8484
#endif
8585
--
86-
2.41.0
86+
2.45.1
8787

patches/rocm-6.1.1/aotriton/0004-added-more-cmake-options.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 1f1e03e53be0afa7541d50b19faf232ded2f014a Mon Sep 17 00:00:00 2001
1+
From 5883905718624eabf52db566d4644c35af8190f0 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <[email protected]>
33
Date: Mon, 20 May 2024 11:17:52 -0700
4-
Subject: [PATCH 4/5] added more cmake options
4+
Subject: [PATCH 4/6] added more cmake options
55

66
following cmake options can now be passed from
77
aotriton to triton
@@ -128,5 +128,5 @@ index 55425ad..02a0ccd 100644
128128
cmake_args.append("-DLLVM_EXTERNAL_LIT=" + lit_dir)
129129
cmake_args.extend(thirdparty_cmake_args)
130130
--
131-
2.41.0
131+
2.45.1
132132

patches/rocm-6.1.1/aotriton/0005-work-in-progress-to-add-more-gpus.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 66e26bf6896c4fcfd864cf14ad4563298595cdd9 Mon Sep 17 00:00:00 2001
1+
From 44414d45fefd4296f6f06718bcd49acd1033f610 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <[email protected]>
33
Date: Mon, 20 May 2024 11:20:19 -0700
4-
Subject: [PATCH 5/5] work in progress to add more gpus
4+
Subject: [PATCH 5/6] work in progress to add more gpus
55

66
this patch does not yet work, gpu
77
capabilities needs to be double checked at least.
@@ -95,5 +95,5 @@ index 86ef5dc..1c3430b 100644
9595
+ 'gfx1035' : 'GPU_ARCH_AMD_GFX1035',
9696
}
9797
--
98-
2.41.0
98+
2.45.1
9999

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From f9405e96aa6b6f8259ef8a95fbd70c8a9fc0f457 Mon Sep 17 00:00:00 2001
2+
From: mritunjaymusale <[email protected]>
3+
Date: Sun, 2 Jun 2024 18:00:59 +0530
4+
Subject: [PATCH 6/6] changed the line which allocates twice the number of max
5+
cpu threads to triton build
6+
7+
Signed-off-by: mritunjaymusale <[email protected]>
8+
---
9+
third_party/triton/python/setup.py | 2 +-
10+
1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+
diff --git a/third_party/triton/python/setup.py b/third_party/triton/python/setup.py
13+
index 02a0ccd..166f974 100644
14+
--- a/third_party/triton/python/setup.py
15+
+++ b/third_party/triton/python/setup.py
16+
@@ -297,7 +297,7 @@ class CMakeBuild(build_ext):
17+
build_args += ["--", "/m"]
18+
else:
19+
cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg]
20+
- max_jobs = os.getenv("MAX_JOBS", str(2 * os.cpu_count()))
21+
+ max_jobs = os.getenv("MAX_JOBS", str(os.cpu_count()))
22+
build_args += ['-j' + max_jobs]
23+
24+
if check_env_flag("TRITON_BUILD_WITH_CLANG_LLD"):
25+
--
26+
2.45.1
27+

0 commit comments

Comments
 (0)