Skip to content

Commit 3e2f9f7

Browse files
authored
Merge branch 'develop' into enable_leaky_relu
2 parents f9ce181 + 6d21984 commit 3e2f9f7

7 files changed

Lines changed: 40 additions & 30 deletions

File tree

Paddle

Submodule Paddle updated 163 files

backends/iluvatar_gpu/kernels/cuda_kernels/c_softmax_with_cross_entropy_grad_kernel_register.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#include "paddle/phi/core/kernel_registry.h"
16-
#include "paddle/phi/kernels/gpu/c_softmax_with_cross_entropy_grad_kernel.cu" // NOLINT
16+
#include "paddle/phi/kernels/c_softmax_with_cross_entropy_grad_kernel.h"
1717

1818
PD_CUSTOM_KERNEL_REGISTER(c_softmax_with_cross_entropy_grad,
1919
iluvatar_gpu,

backends/iluvatar_gpu/kernels/cuda_kernels/fused_transpose_split_quant_kernel_register.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#include "paddle/phi/core/kernel_registry.h"
16-
#include "paddle/phi/kernels/fusion/gpu/fused_transpose_split_quant_kernel.cu" //NOLINT
16+
#include "paddle/phi/kernels/fusion/gpu/fused_transpose_split_quant_kernel.h"
1717
#include "paddle/phi/kernels/fusion/gpu/quant_utils.h"
1818

1919
PD_CUSTOM_KERNEL_REGISTER(fused_transpose_split_quant,

backends/iluvatar_gpu/patches/paddle-corex.patch

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,7 @@ index a943bbed9a..dc6384985f 100644
180180

181181
#ifdef PADDLE_WITH_CUDNN_FRONTEND
182182
#define CUDNN_DNN_ROUTINE_EACH_FRONTEND(__macro) \
183-
@@ -191,7 +208,7 @@ CUDNN_DNN_ROUTINE_EACH_FRONTEND(DECLARE_DYNAMIC_LOAD_CUDNN_WRAP)
184-
CUDNN_DNN_ROUTINE_EACH_REMOVED_IN_E9(DECLARE_DYNAMIC_LOAD_CUDNN_WRAP)
185-
#endif
186-
187-
-#if CUDNN_VERSION < 90000
188-
+#if CUDNN_VERSION < 90000 && CUDNN_VERSION >= 7201
189-
#define CUDNN_DNN_ROUTINE_EACH_AFTER_TWO_R7_REMOVED_IN_E9(__macro) \
190-
__macro(cudnnSetRNNPaddingMode); \
191-
__macro(cudnnRNNForwardInferenceEx); \
192-
@@ -212,6 +229,15 @@ CUDNN_DNN_ROUTINE_EACH_AFTER_TWO_R7_REMOVED_IN_E9(
183+
@@ -210,6 +227,15 @@ CUDNN_DNN_ROUTINE_EACH_AFTER_TWO_R7_REMOVED_IN_E9(
193184
__macro(cudnnRNNBackwardWeights_v8);
194185
CUDNN_DNN_ROUTINE_EACH_R9(DECLARE_DYNAMIC_LOAD_CUDNN_WRAP)
195186
#endif

backends/iluvatar_gpu/tests/CMakeLists.txt

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,37 @@ set(EXCLUDED_TESTS
1111
"test_ops_roi_align.py" "test_tensor_fill_diagonal_tensor_op_iluvatar.py"
1212
"test_tensor_fill_diagonal_op_iluvatar.py" "test_bincount_op_iluvatar.py")
1313

14-
list(JOIN EXCLUDED_TESTS " or " EXCLUDE_EXPR)
15-
set(K_FILTER "not (${EXCLUDE_EXPR})")
16-
17-
add_test(
18-
NAME pytest_main
19-
COMMAND ${Python_EXECUTABLE} -m pytest ${CMAKE_SOURCE_DIR}/unittests/ -k
20-
${K_FILTER} --tb=short -v
21-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
22-
23-
set_tests_properties(
24-
pytest_main
25-
PROPERTIES
26-
ENVIRONMENT "PYTHONPATH=${LEGACY_TEST_PATH}:$ENV{PYTHONPATH}"
27-
"LD_PRELOAD=${LD_LIBRARY_PATH}/libcuda.so.1"
28-
"CUSTOM_DEVICE_ROOT=${CMAKE_BINARY_DIR}/python/paddle_custom_device/")
14+
# Find all test files
15+
file(GLOB TEST_FILES "${CMAKE_SOURCE_DIR}/unittests/test_*.py")
16+
17+
# Create a separate CTest test for each test file
18+
foreach(TEST_FILE ${TEST_FILES})
19+
get_filename_component(TEST_NAME ${TEST_FILE} NAME)
20+
21+
# Check if it's in the exclusion list
22+
set(IS_EXCLUDED FALSE)
23+
foreach(EXCLUDED_TEST ${EXCLUDED_TESTS})
24+
if(TEST_NAME STREQUAL EXCLUDED_TEST)
25+
set(IS_EXCLUDED TRUE)
26+
break()
27+
endif()
28+
endforeach()
29+
30+
# If not in the exclusion list, add the test
31+
if(NOT IS_EXCLUDED)
32+
# Get the filename without extension as the test name
33+
get_filename_component(TEST_BASE_NAME ${TEST_FILE} NAME_WE)
34+
35+
add_test(
36+
NAME ${TEST_BASE_NAME}
37+
COMMAND ${Python_EXECUTABLE} -m pytest ${TEST_FILE} --tb=short
38+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
39+
40+
set_tests_properties(
41+
${TEST_BASE_NAME}
42+
PROPERTIES
43+
ENVIRONMENT "PYTHONPATH=${LEGACY_TEST_PATH}:$ENV{PYTHONPATH}"
44+
"LD_PRELOAD=${LD_LIBRARY_PATH}/libcuda.so.1"
45+
"CUSTOM_DEVICE_ROOT=${CMAKE_BINARY_DIR}/python/paddle_custom_device/")
46+
endif()
47+
endforeach()

backends/iluvatar_gpu/tests/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ echo "=== Building project (if needed) ==="
6363
make -j$(nproc) || { echo "ERROR: Build failed"; exit 1; }
6464

6565
echo "=== Running tests ==="
66-
ctest --output-on-failure -V || {
66+
ctest --output-on-failure -V -j8 || {
6767
echo "ERROR: Tests failed!" >&2
6868
echo "Exit code: $?" >&2
6969
exit 1

backends/metax_gpu/kernels/fusion/fused_transpose_split_quant_kernel_register.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
#include "paddle/phi/core/kernel_registry.h"
16-
#include "paddle/phi/kernels/fusion/gpu/fused_transpose_split_quant_kernel.cu" //NOLINT
16+
#include "paddle/phi/kernels/fusion/gpu/fused_transpose_split_quant_kernel.h"
1717
#include "paddle/phi/kernels/fusion/gpu/quant_utils.h"
1818

1919
PD_CUSTOM_KERNEL_REGISTER(fused_transpose_split_quant,

0 commit comments

Comments
 (0)