-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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>
- Loading branch information
Showing
52 changed files
with
1,088 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/rocm-6.1.2/DeepSpeed/0001-deepspeed-rocm-preconfig-and-build_install-scripts.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/rocm-6.1.2/DeepSpeed/0002-check-rocm-path-from-installed-pytorch-variables.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/rocm-6.1.2/DeepSpeed/0004-remove-linear_kernel-which-fails-on-rocm.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
patches/rocm-6.1.2/MIOpen/0005-gfx1036-and-gfx1103-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
From 08071937d4c2c34f619ed5b49bd0ced4805875fa Mon Sep 17 00:00:00 2001 | ||
From: Mika Laitio <lamikr@gmail.com> | ||
Date: Sat, 13 Jul 2024 21:07:11 -0400 | ||
Subject: [PATCH 5/5] gfx1036 and gfx1103 support | ||
|
||
Signed-off-by: Mika Laitio <lamikr@gmail.com> | ||
--- | ||
.../composable_kernel/include/utility/config.hpp | 15 ++++++++------- | ||
src/include/miopen/solver/ck_utility_common.hpp | 8 +++++++- | ||
src/target_properties.cpp | 14 ++++++++++++-- | ||
3 files changed, 27 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/src/composable_kernel/composable_kernel/include/utility/config.hpp b/src/composable_kernel/composable_kernel/include/utility/config.hpp | ||
index 5957a79d8..6ca920b5e 100644 | ||
--- a/src/composable_kernel/composable_kernel/include/utility/config.hpp | ||
+++ b/src/composable_kernel/composable_kernel/include/utility/config.hpp | ||
@@ -16,8 +16,8 @@ | ||
#if !(defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \ | ||
defined(CK_AMD_GPU_GFX940) || defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || \ | ||
defined(CK_AMD_GPU_GFX941) || defined(CK_AMD_GPU_GFX942) || defined(CK_AMD_GPU_GFX1010) || defined(CK_AMD_GPU_GFX1030) || \ | ||
- defined(CK_AMD_GPU_GFX1031) || defined(CK_AMD_GPU_GFX1035) || defined(CK_AMD_GPU_GFX1100) || defined(CK_AMD_GPU_GFX1101) || \ | ||
- defined(CK_AMD_GPU_GFX1102)) | ||
+ defined(CK_AMD_GPU_GFX1031) || defined(CK_AMD_GPU_GFX1035) || defined(CK_AMD_GPU_GFX1036) || defined(CK_AMD_GPU_GFX1100) || defined(CK_AMD_GPU_GFX1101) || \ | ||
+ defined(CK_AMD_GPU_GFX1102) || defined(CK_AMD_GPU_GFX1103)) | ||
#error Need to define (only) one GPU target | ||
#endif | ||
|
||
@@ -29,14 +29,15 @@ | ||
#define CK_MIN_BLOCK_PER_CU 2 | ||
#endif | ||
|
||
-// TODO: gfx1010 check CK_BUFFER_RESOURCE_3RD_DWORD | ||
+// TODO: composable_kernel has differend CK_BUFFER_RESOURCE_3RD_DWORD for gfx110* devices | ||
// buffer resourse | ||
#if defined(CK_AMD_GPU_GFX803) || defined(CK_AMD_GPU_GFX900) || defined(CK_AMD_GPU_GFX906) || \ | ||
defined(CK_AMD_GPU_GFX941) || defined(CK_AMD_GPU_GFX942) || defined(CK_AMD_GPU_GFX940) || \ | ||
- defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) || defined(CK_AMD_GPU_GFX1010) | ||
+ defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90A) | ||
#define CK_BUFFER_RESOURCE_3RD_DWORD 0x00020000 | ||
-#elif defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031) || defined(CK_AMD_GPU_GFX1035) || defined(CK_AMD_GPU_GFX1100) || \ | ||
- defined(CK_AMD_GPU_GFX1101) || defined(CK_AMD_GPU_GFX1102) | ||
+#elif defined(CK_AMD_GPU_GFX1010) || defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031) || \ | ||
+ defined(CK_AMD_GPU_GFX1035) || defined(CK_AMD_GPU_GFX1036) || \ | ||
+ defined(CK_AMD_GPU_GFX1100) || defined(CK_AMD_GPU_GFX1101) || defined(CK_AMD_GPU_GFX1102) || defined(CK_AMD_GPU_GFX1103) | ||
#define CK_BUFFER_RESOURCE_3RD_DWORD 0x31014000 | ||
#endif | ||
|
||
@@ -49,7 +50,7 @@ | ||
#elif defined(CK_AMD_GPU_GFX906) || defined(CK_AMD_GPU_GFX908) || defined(CK_AMD_GPU_GFX90a) || \ | ||
defined(CK_AMD_GPU_GFX941) || defined(CK_AMD_GPU_GFX942) || defined(CK_AMD_GPU_GFX940) || \ | ||
defined(CK_AMD_GPU_GFX1030) || defined(CK_AMD_GPU_GFX1031) || defined(CK_AMD_GPU_GFX1100) || \ | ||
- defined(CK_AMD_GPU_GFX1101) || defined(CK_AMD_GPU_GFX1102) | ||
+ defined(CK_AMD_GPU_GFX1101) || defined(CK_AMD_GPU_GFX1102) || defined(CK_AMD_GPU_GFX1103) | ||
#define CK_USE_AMD_V_FMAC_F32 | ||
#define CK_USE_AMD_V_DOT2_F32_F16 | ||
#define CK_USE_AMD_V_DOT4_I32_I8 | ||
diff --git a/src/include/miopen/solver/ck_utility_common.hpp b/src/include/miopen/solver/ck_utility_common.hpp | ||
index aea036066..ea5629871 100644 | ||
--- a/src/include/miopen/solver/ck_utility_common.hpp | ||
+++ b/src/include/miopen/solver/ck_utility_common.hpp | ||
@@ -61,9 +61,11 @@ static inline bool is_ck_supported_hardware(const Handle& handle) | ||
StartsWith(handle.GetDeviceName(), "gfx1030") || | ||
StartsWith(handle.GetDeviceName(), "gfx1031") || | ||
StartsWith(handle.GetDeviceName(), "gfx1035") || | ||
+ StartsWith(handle.GetDeviceName(), "gfx1036") || | ||
StartsWith(handle.GetDeviceName(), "gfx1100") || | ||
StartsWith(handle.GetDeviceName(), "gfx1101") || | ||
- StartsWith(handle.GetDeviceName(), "gfx1102"); | ||
+ StartsWith(handle.GetDeviceName(), "gfx1102") || | ||
+ StartsWith(handle.GetDeviceName(), "gfx1103"); | ||
} | ||
|
||
// MI100 : gfx908 | ||
@@ -121,12 +123,16 @@ static inline auto get_ck_common_compiler_flag(const Handle& handle) | ||
compiler_flag << " -DCK_AMD_GPU_GFX1031"; | ||
else if(StartsWith(device_name, "gfx1035")) | ||
compiler_flag << " -DCK_AMD_GPU_GFX1035"; | ||
+ else if(StartsWith(device_name, "gfx1036")) | ||
+ compiler_flag << " -DCK_AMD_GPU_GFX1036"; | ||
else if(StartsWith(device_name, "gfx1100")) | ||
compiler_flag << " -DCK_AMD_GPU_GFX1100"; | ||
else if(StartsWith(device_name, "gfx1101")) | ||
compiler_flag << " -DCK_AMD_GPU_GFX1101"; | ||
else if(StartsWith(device_name, "gfx1102")) | ||
compiler_flag << " -DCK_AMD_GPU_GFX1102"; | ||
+ else if(StartsWith(device_name, "gfx1103")) | ||
+ compiler_flag << " -DCK_AMD_GPU_GFX1103"; | ||
// NOLINTEND(*-braces-around-statements) | ||
|
||
// buffer atomic-fadd | ||
diff --git a/src/target_properties.cpp b/src/target_properties.cpp | ||
index c3fa2bd3a..de979aae9 100644 | ||
--- a/src/target_properties.cpp | ||
+++ b/src/target_properties.cpp | ||
@@ -52,9 +52,19 @@ static std::string GetDeviceNameFromMap(const std::string& in) | ||
{"gfx804", "gfx803"}, | ||
{"Vega10", "gfx900"}, | ||
{"gfx901", "gfx900"}, | ||
- {"Navi10", "gfx1010"}, | ||
+ {"navi10", "gfx1010"}, | ||
+ {"navi12", "gfx1011"}, | ||
+ {"navi14", "gfx1012"}, | ||
{"10.3.0 Sienna_Cichlid 18", "gfx1030"}, | ||
- {"Rembrandt", "gfx1035"}, | ||
+ {"navi22", "gfx1031"}, | ||
+ {"navi23", "gfx1032"}, | ||
+ {"navi24", "gfx1034"}, | ||
+ {"rembrandt", "gfx1035"}, | ||
+ {"raphael", "gfx1036"}, | ||
+ {"navi31", "gfx1100"}, | ||
+ {"navi32", "gfx1101"}, | ||
+ {"navi33", "gfx1102"}, | ||
+ {"phoenix", "gfx1103"}, | ||
}; | ||
|
||
const auto& dev_str = miopen::GetStringEnv(ENV(MIOPEN_DEBUG_ENFORCE_DEVICE)); | ||
-- | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.