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
4 changes: 4 additions & 0 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,8 @@ function run_linux_cpu_test() {
pip install hypothesis
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/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`
if [ ${WITH_TESTING:-ON} == "ON" ] ; then
cat <<EOF
Expand Down Expand Up @@ -2380,6 +2382,8 @@ function parallel_test() {
pip install hypothesis
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/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`
if [ "$WITH_CINN" == "ON" ];then
parallel_test_base_cinn
Expand Down
11 changes: 7 additions & 4 deletions python/paddle/fluid/tests/unittests/op_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import print_function

import os
import sys
import unittest
import warnings
import numpy as np
Expand All @@ -37,20 +38,22 @@
from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor
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,
set_input,
append_input_output,
append_loss_ops, )
from paddle.fluid import unique_name
from paddle.fluid.tests.unittests.white_list import (
from white_list import (
op_accuracy_white_list,
check_shape_white_list,
compile_vs_runtime_white_list,
no_check_set_white_list,
op_threshold_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
g_is_in_eager = _in_eager_without_dygraph_check()
Expand Down