Skip to content

Commit 3fc282c

Browse files
committed
initial gfx1036 and gfx1103 support
- initial support for gfx1036 and gfx1103 as a build target - updated also the gfx1010 configuration settings to be more similar in composable kernel and miopen fixes: #101 fixes: #103 Signed-off-by: Mika Laitio <lamikr@gmail.com>
1 parent c62cca1 commit 3fc282c

File tree

52 files changed

+1088
-267
lines changed

Some content is hidden

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

52 files changed

+1088
-267
lines changed

binfo/040_02_onnxruntime_deepspeed.binfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BINFO_APP_PRE_CONFIG_CMD_ARRAY=(
1414

1515
BINFO_APP_BUILD_CMD_ARRAY=(
1616
"cd ${BINFO_APP_SRC_DIR}"
17-
"./build_rocm.sh \"${SEMICOLON_SEPARATED_GPU_TARGET_LIST_DEFAULT}\""
17+
"./build_rocm.sh ${SEMICOLON_SEPARATED_GPU_TARGET_LIST_DEFAULT}"
1818
)
1919

2020
BINFO_APP_INSTALL_CMD_ARRAY=(

binfo/user_config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Function to select ROCM SDK build target GPUs
44
func_build_cfg_user() {
55
local message="Select ROCM SDK build target GPUs. Space to select, Enter to finish save, ESC to cancel."
6-
local options="gfx906|gfx90a|gfx940|gfx1010|gfx1011|gfx1012|gfx1030|gfx1031|gfx1035|gfx1100|gfx1101|gfx1102|gfx1150|gfx1151"
6+
local options="gfx906|gfx90a|gfx940|gfx1010|gfx1011|gfx1012|gfx1030|gfx1031|gfx1035|gfx1036|gfx1100|gfx1101|gfx1102|gfx1103|gfx1150|gfx1151"
77
local script_path="./build/checkbox.sh"
88

99
# Check if the script exists and is executable
@@ -14,4 +14,4 @@ func_build_cfg_user() {
1414

1515
# Execute the checkbox script with the specified parameters
1616
"$script_path" --message="$message" --options="$options" --multiple
17-
}
17+
}

patches/rocm-6.1.2/DeepSpeed/0001-deepspeed-rocm-preconfig-and-build_install-scripts.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 108755dda9e284382bd0b63e5e351cba9f7abb16 Mon Sep 17 00:00:00 2001
1+
From 3d237f904f4f74618da216179f9279fd027b05e8 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@gmail.com>
33
Date: Mon, 20 May 2024 22:36:23 -0700
44
Subject: [PATCH 1/4] deepspeed rocm preconfig and build_install scripts

patches/rocm-6.1.2/DeepSpeed/0002-check-rocm-path-from-installed-pytorch-variables.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 40f44ac1ca3cc73851bfb7c3016276894022eb4f Mon Sep 17 00:00:00 2001
1+
From ff7f27c49a5ac7ac31f7ebc70e02c18f3aa0ac91 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@gmail.com>
33
Date: Tue, 21 May 2024 07:57:53 -0700
44
Subject: [PATCH 2/4] check rocm path from installed pytorch variables

patches/rocm-6.1.2/DeepSpeed/0003-allow-building-deepspeed-for-rocm-in-virtual-linux.patch

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 59fe85c08a0900acaf07bd2aa506853af3fbd83e Mon Sep 17 00:00:00 2001
1+
From e423db20d2eb75934214c4487fb4193f3df389a9 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@gmail.com>
33
Date: Wed, 26 Jun 2024 14:44:04 -0700
44
Subject: [PATCH 3/4] allow building deepspeed for rocm in virtual linux
@@ -10,24 +10,26 @@ fixes: https://github.com/lamikr/rocm_sdk_builder/issues/75
1010

1111
Signed-off-by: Mika Laitio <lamikr@gmail.com>
1212
---
13-
build_rocm.sh | 2 ++
13+
build_rocm.sh | 4 +++-
1414
op_builder/builder.py | 2 +-
1515
setup.py | 18 ++++++++++--------
16-
3 files changed, 13 insertions(+), 9 deletions(-)
16+
3 files changed, 14 insertions(+), 10 deletions(-)
1717

1818
diff --git a/build_rocm.sh b/build_rocm.sh
19-
index f4a75855..3f3ce526 100755
19+
index f4a75855..b48a0ad9 100755
2020
--- a/build_rocm.sh
2121
+++ b/build_rocm.sh
22-
@@ -15,6 +15,8 @@ mkdir -p deepspeed/ops/spatial
22+
@@ -15,7 +15,9 @@ mkdir -p deepspeed/ops/spatial
2323
#export CFLAGS="-I/usr/include"
2424
#export LDFLAGS="-L/usr/lib64"
2525

2626
+# needed by real accelerator.py to detect the cuda when build on virtual linux without access to real hardware
2727
+export DS_ACCELERATOR=cuda
2828
# install command will create wheel and install it. bdist_wheel comamnd would only create the wheel
29-
AMDGPU_TARGETS=${amd_target_gpu} DS_BUILD_AIO=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_QUANTIZER=0 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 DS_BUILD_OPS=1 python setup.py bdist_wheel
29+
-AMDGPU_TARGETS=${amd_target_gpu} DS_BUILD_AIO=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_QUANTIZER=0 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 DS_BUILD_OPS=1 python setup.py bdist_wheel
30+
+AMDGPU_TARGETS="${amd_target_gpu}" DS_BUILD_AIO=0 DS_BUILD_FP_QUANTIZER=0 DS_BUILD_QUANTIZER=0 DS_BUILD_SPARSE_ATTN=0 DS_BUILD_RAGGED_DEVICE_OPS=0 DS_BUILD_CUTLASS_OPS=0 DS_BUILD_EVOFORMER_ATTN=0 DS_BUILD_OPS=1 python setup.py bdist_wheel
3031

32+
#DS_BUILD_UTILS=1 DS_BUILD_CPU_ADAGRAD=1 DS_BUILD_RANDOM_LTD=1 DS_BUILD_CPU_ADAM=1 DS_BUILD_FUSED_ADAM=1 DS_BUILD_FUSED_LAMB=1 DS_BUILD_CCL_COMM=1 python setup.py develop
3133
diff --git a/op_builder/builder.py b/op_builder/builder.py
3234
index a27b134c..4980a528 100644
3335
--- a/op_builder/builder.py

patches/rocm-6.1.2/DeepSpeed/0004-remove-linear_kernel-which-fails-on-rocm.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From bae0b1c89880e23f8ec885eba5f18043726319a0 Mon Sep 17 00:00:00 2001
1+
From 44b7a213e104e7f7b9e6f9b7e63f5eb8ff7be88f Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@gmail.com>
33
Date: Tue, 21 May 2024 11:41:20 -0700
44
Subject: [PATCH 4/4] remove linear_kernel which fails on rocm

patches/rocm-6.1.2/MIOpen/0001-Do-not-fail-on-install-for-missing-kdb.bz2-file.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 915a3c074ff1c3694566fd74f2e83003a1253104 Mon Sep 17 00:00:00 2001
1+
From 7b51b6d06842de4851b6c20b61dda2ead78e68ff Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@pilppa.org>
33
Date: Wed, 8 May 2024 13:48:21 -0700
4-
Subject: [PATCH 1/4] Do not fail on install for missing kdb.bz2 file
4+
Subject: [PATCH 1/5] Do not fail on install for missing kdb.bz2 file
55

66
Do not fail if kdb.bz2 file for some GPU does not exist because
77
these kdb files are not mandatory. Their function is to speed up the
@@ -43,5 +43,5 @@ index 32d9a2e5b..d6c2db704 100644
4343
endif()
4444

4545
--
46-
2.41.1
46+
2.45.2
4747

patches/rocm-6.1.2/MIOpen/0002-fix-libroctx64.so-linking-error.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ecb981cd1b66749186404fa76c56237c758953b5 Mon Sep 17 00:00:00 2001
1+
From fdc0e268b2edbb0a57af8e8820b388816af38471 Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@pilppa.org>
33
Date: Fri, 3 May 2024 14:15:09 -0700
4-
Subject: [PATCH 2/4] fix libroctx64.so linking error
4+
Subject: [PATCH 2/5] fix libroctx64.so linking error
55

66
search the library and if found link it from there
77
instead of expecting it to be in the ld library path
@@ -31,5 +31,5 @@ index 0741a6023..ae4405eed 100644
3131

3232
############################################################
3333
--
34-
2.41.1
34+
2.45.2
3535

patches/rocm-6.1.2/MIOpen/0003-MIOpen-gfx1010-and-gfx1035-support.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 6578a68e3226e97716aad12d445632358f2a463e Mon Sep 17 00:00:00 2001
1+
From 4b65dfcb0208bfe1eb64c474fb97e31e2b8bf60f Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@gmail.com>
33
Date: Tue, 19 Dec 2023 15:13:46 -0800
4-
Subject: [PATCH 3/4] MIOpen gfx1010 and gfx1035 support
4+
Subject: [PATCH 3/5] MIOpen gfx1010 and gfx1035 support
55

66
- todo: check gfx1010 specific parts
77

@@ -174,5 +174,5 @@ index 16ce78f04..2ec3eaf09 100644
174174
"gfx1101",
175175
"gfx1102"};
176176
--
177-
2.41.1
177+
2.45.2
178178

patches/rocm-6.1.2/MIOpen/0004-improved-gfx1010-support.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 5e7803271cbbe475da352ab188f09b345006d9c0 Mon Sep 17 00:00:00 2001
1+
From 3c0552223df66774e8f3613826a6094939763cce Mon Sep 17 00:00:00 2001
22
From: Mika Laitio <lamikr@pilppa.org>
33
Date: Mon, 8 Jul 2024 21:44:10 +0300
4-
Subject: [PATCH 4/4] improved gfx1010 support
4+
Subject: [PATCH 4/5] improved gfx1010 support
55

66
- allows running pytorch gpu benchmark
77
on gfx1010/amd rx 5700
@@ -135,5 +135,5 @@ index bf02d4d55..c3fa2bd3a 100644
135135
{"Rembrandt", "gfx1035"},
136136
};
137137
--
138-
2.41.1
138+
2.45.2
139139

0 commit comments

Comments
 (0)