未验证 提交 62c0304b 编写于 作者: A Aganlengzi 提交者: GitHub

[CustomDevice]change import way of unpublished file in op_test test=allcases (#42285)

* test op_test test=allcases

* fix

* avoid copy many same file

* fix for win

* test PYTHONPATH

* change path adding way

* fix win

* use old way

* use old way test=allcase

* use old way test=allcase
上级 f4507974
...@@ -752,6 +752,8 @@ function run_linux_cpu_test() { ...@@ -752,6 +752,8 @@ function run_linux_cpu_test() {
pip install hypothesis pip install hypothesis
pip install ${PADDLE_ROOT}/build/python/dist/*whl pip install ${PADDLE_ROOT}/build/python/dist/*whl
cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python
cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/testsuite.py ${PADDLE_ROOT}/build/python
cp -r ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/white_list ${PADDLE_ROOT}/build/python
ut_total_startTime_s=`date +%s` ut_total_startTime_s=`date +%s`
if [ ${WITH_TESTING:-ON} == "ON" ] ; then if [ ${WITH_TESTING:-ON} == "ON" ] ; then
cat <<EOF cat <<EOF
...@@ -2404,6 +2406,8 @@ function parallel_test() { ...@@ -2404,6 +2406,8 @@ function parallel_test() {
pip install hypothesis pip install hypothesis
pip install ${PADDLE_ROOT}/build/python/dist/*whl pip install ${PADDLE_ROOT}/build/python/dist/*whl
cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python
cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/testsuite.py ${PADDLE_ROOT}/build/python
cp -r ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/white_list ${PADDLE_ROOT}/build/python
ut_total_startTime_s=`date +%s` ut_total_startTime_s=`date +%s`
if [ "$WITH_CINN" == "ON" ];then if [ "$WITH_CINN" == "ON" ];then
parallel_test_base_cinn parallel_test_base_cinn
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import unittest import unittest
import warnings import warnings
import numpy as np import numpy as np
...@@ -37,20 +38,22 @@ from paddle.fluid.backward import append_backward ...@@ -37,20 +38,22 @@ from paddle.fluid.backward import append_backward
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.framework import Program, OpProtoHolder, Variable, _current_expected_place from paddle.fluid.framework import Program, OpProtoHolder, Variable, _current_expected_place
from paddle.fluid.tests.unittests.testsuite import ( from paddle.fluid import unique_name
from paddle.fluid.dygraph.dygraph_to_static.utils import parse_arg_and_kwargs
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from testsuite import (
create_op, create_op,
set_input, set_input,
append_input_output, append_input_output,
append_loss_ops, ) append_loss_ops, )
from paddle.fluid import unique_name from white_list import (
from paddle.fluid.tests.unittests.white_list import (
op_accuracy_white_list, op_accuracy_white_list,
check_shape_white_list, check_shape_white_list,
compile_vs_runtime_white_list, compile_vs_runtime_white_list,
no_check_set_white_list, no_check_set_white_list,
op_threshold_white_list, op_threshold_white_list,
no_grad_set_white_list, ) no_grad_set_white_list, )
from paddle.fluid.dygraph.dygraph_to_static.utils import parse_arg_and_kwargs
# For switch new eager mode globally # For switch new eager mode globally
g_is_in_eager = _in_eager_without_dygraph_check() g_is_in_eager = _in_eager_without_dygraph_check()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册