Skip to content

Commit a1b23e3

Browse files
metax666duqimeng
andauthored
[Metax] Fix eigen cmake bug (#223) (#2451)
* [Metax] Fix eigen cmake bug * [Metax] Fix allow_tf32_cublas * fix patch * [Metax] Fix error rnn * [Metax] Fix error rnn * [Metax] update paddle Co-authored-by: duqimeng <77875733+duqimeng@users.noreply.github.com>
1 parent 5af340b commit a1b23e3

4 files changed

Lines changed: 20 additions & 13 deletions

File tree

Paddle

Submodule Paddle updated 627 files

backends/metax_gpu/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ file(
158158
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/grid_sample_kernel.cu
159159
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/instance_norm_grad_kernel.cu
160160
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/instance_norm_kernel.cu
161-
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rnn_grad_kernel.cu.cc
162-
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rnn_kernel.cu.cc
161+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rnn_grad_kernel.cu
162+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rnn_kernel.cu
163163
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/ctc_align_kernel.cu
164164
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/yolo_box_head_kernel.cu
165165
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/stft_grad_kernel.cu

backends/metax_gpu/patch/paddle.patch

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake
2-
index cfada544d4..a690e97d74 100644
2+
index 6790d961f8..37b841bfc4 100644
33
--- a/cmake/external/eigen.cmake
44
+++ b/cmake/external/eigen.cmake
5-
@@ -42,12 +42,12 @@ endif()
5+
@@ -42,14 +42,14 @@ endif()
66
file(TO_NATIVE_PATH "${PADDLE_SOURCE_DIR}/patches/eigen/TensorRandom.h.patch"
77
tensor_random_header)
88
# See: [Why calling some `git` commands before `patch`?]
9-
-set(EIGEN_PATCH_COMMAND git checkout -- . && git checkout ${EIGEN_TAG} && git
10-
- apply ${tensor_random_header})
11-
+# set(EIGEN_PATCH_COMMAND git checkout -- . && git checkout ${EIGEN_TAG} && git
12-
+# apply ${tensor_random_header})
9+
-set(EIGEN_PATCH_COMMAND
10+
- git checkout -- Eigen/src/Core/arch/SSE/Complex.h
11+
- unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h && git checkout
12+
- ${EIGEN_TAG} && git apply ${tensor_random_header})
13+
+# set(EIGEN_PATCH_COMMAND
14+
+# git checkout -- Eigen/src/Core/arch/SSE/Complex.h
15+
+# unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h && git checkout
16+
+# ${EIGEN_TAG} && git apply ${tensor_random_header})
1317
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
1418
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/eigen/Complex.h.patch
1519
complex_header)
@@ -35,18 +39,19 @@ index 8d445b39ae..504e7b6293 100755
3539
op_library(fused_gemm_epilogue_op)
3640
endif()
3741
diff --git a/paddle/phi/backends/dynload/dynamic_loader.cc b/paddle/phi/backends/dynload/dynamic_loader.cc
38-
index 37ee00b591..f497472ad9 100644
42+
index 99d3733da0..d0c8783afd 100644
3943
--- a/paddle/phi/backends/dynload/dynamic_loader.cc
4044
+++ b/paddle/phi/backends/dynload/dynamic_loader.cc
41-
@@ -18,7 +18,6 @@ limitations under the License. */
42-
#include <cstdlib>
45+
@@ -19,7 +19,7 @@ limitations under the License. */
46+
#include <locale>
4347
#include <string>
4448
#include <vector>
4549
-#include "paddle/phi/backends/dynload/cupti_lib_path.h"
50+
+// #include "paddle/phi/backends/dynload/cupti_lib_path.h"
4651
#include "paddle/phi/common/port.h"
4752
#include "paddle/phi/core/enforce.h"
4853

49-
@@ -112,6 +111,10 @@ COMMON_DECLARE_string(magma_dir);
54+
@@ -113,6 +113,10 @@ COMMON_DECLARE_string(magma_dir);
5055
#define SPARSELT_LIB_NAME "libcusparseLt.so"
5156
#endif
5257

@@ -1096,3 +1101,4 @@ index d8bc15926b..6071baf340 100644
10961101

10971102
PADDLE_ENFORCE_EQ(
10981103
status,
1104+

backends/metax_gpu/tests/ignore.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ test_householder_product
7171
test_paddle_device
7272
test_conv2d_op
7373
test_rnn_op
74+
test_interp_antialias_op
7475

7576
[internet]
7677
test_hapi_amp

0 commit comments

Comments
 (0)