-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DCU]Fix build error on rocm5.7 (#63738)
* [ROCM]Add patch for warprnnt/warpctc * add rocm_path to cmake_prefix_path * rm ambiguous apt because rocm has implemented Signed-off-by: jiajuku <jiajuku12@163.com> * [ROCM] fix build error on rocm5.7 * change expression of Xcompiler since clang17 only support "-Xcompiler xxx" instead of "-Xcompiler=xxx" * clang17 check warning mre strictly Signed-off-by: jiajuku <jiajuku12@163.com> * [ROCM] add dependent rocm lib Signed-off-by: jiajuku <jiajuku12@163.com> * [ROCM]fix build warning rocm5 requires the include path: $ROCM_PATH/include Signed-off-by: jiajuku <jiajuku12@163.com> * clean code style issue Signed-off-by: jiajuku <jiajuku12@163.com> * Revert "[ROCM] fix build error on rocm5.7" This reverts commit 2b3bb69. * [ROCm]:support rocm 57 * change build option "-Xcompiler" expression, since clang17 reuqire "-Xcompiler xxx" instead of "-Xcompiler=xxx" * remove Werror from HIP_HCC_FLAGS since clang17 check more strictly. Signed-off-by: onepick <juku.jia@hygon.cn> * Fix build error Xcompiler expression for clang17 Signed-off-by: onepick <jiauku@hygon.cn> * Fix build warning * sign-compare * bitwise-instead-of-logical * unknown-warning-option * unused-lambda-capture * unused-variable * unused-but-set-variable * reorder-ctor * deprecated-copy-with-user-provided-copy * unused-local-typedef * missing-braces * sometimes-uninitialized Signed-off-by: onepick <jiauku@hygon.cn> --------- Signed-off-by: jiajuku <jiajuku12@163.com> Signed-off-by: onepick <juku.jia@hygon.cn> Signed-off-by: onepick <jiauku@hygon.cn> Co-authored-by: onepick <juku.jia@hygon.cn> Co-authored-by: onepick <jiauku@hygon.cn>
- Loading branch information
1 parent
bedd212
commit 6354af2
Showing
17 changed files
with
88 additions
and
18 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -24,6 +24,7 @@ option(BUILD_SHARED "build warp-ctc shared library." ON) | ||
option(WITH_ROCM "Compile PaddlePaddle with ROCM platform" OFF) | ||
|
||
if(WITH_ROCM) | ||
+ list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}) | ||
add_definitions(-DWARPCTC_WITH_HIP) | ||
include(hip) | ||
endif(WITH_ROCM) |
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,13 @@ | ||
--- a/include/contrib/moderngpu/include/device/devicetypes.cuh | ||
+++ b/include/contrib/moderngpu/include/device/devicetypes.cuh | ||
@@ -207,10 +207,6 @@ MGPU_HOST_DEVICE int2& operator+=(int2& a, int2 b) { | ||
MGPU_HOST_DEVICE int2 operator*(int2 a, int2 b) { | ||
return make_int2(a.x * b.x, a.y * b.y); | ||
} | ||
-MGPU_HOST_DEVICE int2& operator*=(int2& a, int2 b) { | ||
- a = a * b; | ||
- return a; | ||
-} | ||
|
||
template<typename T> | ||
MGPU_HOST_DEVICE T max(T a, T b) { |
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,10 @@ | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -39,6 +39,7 @@ option(BUILD_SHARED "build warp-rnnt shared library." ON) | ||
option(WITH_ROCM "Compile PaddlePaddle with ROCM platform" OFF) | ||
|
||
if(WITH_ROCM) | ||
+ list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}) | ||
add_definitions(-DWARPRNNT_WITH_HIP) | ||
include(hip) | ||
endif(WITH_ROCM) |