Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/metax_work.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
- name: run test
run: |
cd backends/metax_gpu/tests
bash run_test.sh
bash run_test.sh -j 16
4 changes: 3 additions & 1 deletion backends/metax_gpu/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ if(NOT TEST_LIST_FILE)
list(
REMOVE_ITEM
PYTHON_TEST_SCRIPTS
# Metax unit test
${METAX_UNIT_TEST_PATH}/test_matmul_op__metax.py
# 精度问题
${PADDLE_LEGACY_TEST_PATH}/test_sum_op.py
${PADDLE_LEGACY_TEST_PATH}/test_max_op.py
Expand Down Expand Up @@ -101,5 +103,5 @@ foreach(test_script ${PYTHON_TEST_SCRIPTS})
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()

set_tests_properties("python_${test_name}" PROPERTIES TIMEOUT 360)
set_tests_properties("python_${test_name}" PROPERTIES TIMEOUT 600)
endforeach()
2 changes: 1 addition & 1 deletion backends/metax_gpu/tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mkdir -p build && cd build
TEST_LOG_LEVEL=0
TEST_LIST_FILE=""
TEST_LOG_OUTPUT_DIR=""
TEST_PARALLEL_NUM=10
TEST_PARALLEL_NUM=1

while getopts "i:o:v:j:h" opt; do
case "$opt" in
Expand Down
31 changes: 28 additions & 3 deletions backends/metax_gpu/tests/scripts/classify.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,38 @@

"FAILED":{
"precision":{
"rule":["Mismatched elements"]
"rule":["Mismatched elements",
"RuntimeError: Jacobian mismatch for output 0 in y with respect to input 0 in x on Place(metax_gpu:0),",
"AssertionError: np.float64("]
},
"api":{
"rule":["(PermissionDenied) Cannot use CUDAPinnedPlace", "ValueError: The API paddle.device.cuda.get_device_properties", "TypeError: paddle.index_add api"]
"rule":["(PermissionDenied) Cannot use CUDAPinnedPlace",
"ValueError: The API paddle.device.cuda.get_device_properties",
"TypeError: paddle.index_add api",
"RuntimeError: (Unavailable) Paddle is not compiled with CUDA.",
"ValueError: invalid literal for int() with base",
"AttributeError: module 'paddle.base.libpaddle' has no attribute 'cudnn_version'",
"RuntimeError: Pinning memory is not supported for Place(metax_gpu:0)",
"PreconditionNotMetError: Context place error, excepted GPUPlace, but actually Place(metax_gpu:0).",
"AttributeError: module 'paddle.base.libpaddle.eager.ops.legacy' has no attribute 'fused_gemm_epilogue'",
"ValueError: The device should not be 'gpu', since PaddlePaddle is not compiled with CUDA"]
},
"missing":{
"rule":["missing metax_gpu kernel", "UnimplementedError: There are no kernels which are registered"]
"rule":["missing metax_gpu kernel",
"missing ONEDNN kernel",
"UnimplementedError: There are no kernels which are registered",
"symbol lookup error:",
"RuntimeError: (NotFound) The kernel"]
},
"core_dumped":{
"rule":["Segmentation fault"]
},
"input_dim":{
"rule":["ValueError: (InvalidArgument) The Input(",
"Test range of input is out of bound"]
},
"array_dim":{
"rule":["Arrays are not equal"]
},
"file_not_found":{
"rule":["FileNotFoundError:"]
Expand Down
21 changes: 10 additions & 11 deletions backends/metax_gpu/tests/scripts/log_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def run(self):

cur_res_type = TestResult.FAILURE
cur_sub_type = "other"
pre_line = None
finish_early = False

try:
Expand All @@ -172,19 +171,19 @@ def run(self):
if finish_early:
break

pre_line = line
if finish_early:
break

if "OK" in pre_line:
cur_res_type = TestResult.OK
cur_sub_type = None
for sub_type, sub_type_params in self.__classify_data[
cur_res_type.value
].items():
for rule in sub_type_params["rule"]:
if rule in line:
cur_sub_type = sub_type
if len(line) >= 2 and line[:2] == "OK":
cur_res_type = TestResult.OK
cur_sub_type = None
for sub_type, sub_type_params in self.__classify_data[
cur_res_type.value
].items():
for rule in sub_type_params["rule"]:
if rule in line:
cur_sub_type = sub_type
break

op_name = filename.split(".")
if cur_sub_type is None:
Expand Down
Loading