未验证 提交 9a7c83bd 编写于 作者: R RedContritio 提交者: GitHub

[Move Test] xpu (#52661)

* move python/paddle/fluid/tests/unittests/xpu to test/xpu

* update CMakeLists.txt

* remove xpu in fluid/tests/unittests/

* add path to op_test_xpu

* fix incorrect path

* update test script

* fix test_adadelta_op_xpu error
上级 523f8a26
...@@ -2237,7 +2237,7 @@ set +x ...@@ -2237,7 +2237,7 @@ set +x
set -x set -x
ut_endTime_s=`date +%s` ut_endTime_s=`date +%s`
echo "XPU testCase Time: $[ $ut_endTime_s - $ut_startTime_s ]s" echo "XPU testCase Time: $[ $ut_endTime_s - $ut_startTime_s ]s"
python ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/xpu/get_test_cover_info.py python ${PADDLE_ROOT}/build/test/xpu/get_test_cover_info.py
unset XPU_OP_LIST_DIR unset XPU_OP_LIST_DIR
if [[ "$EXIT_CODE" != "0" ]]; then if [[ "$EXIT_CODE" != "0" ]]; then
exit 8; exit 8;
......
...@@ -772,10 +772,6 @@ add_subdirectory(sequence) ...@@ -772,10 +772,6 @@ add_subdirectory(sequence)
add_subdirectory(rnn) add_subdirectory(rnn)
add_subdirectory(distribution) add_subdirectory(distribution)
if(WITH_XPU)
add_subdirectory(xpu)
endif()
# dist xpu tests: # dist xpu tests:
if(WITH_XPU_BKCL) if(WITH_XPU_BKCL)
py_test(test_collective_allreduce_api_xpu py_test(test_collective_allreduce_api_xpu
......
file(
GLOB TEST_OPS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WITH_XPU_BKCL)
list(REMOVE_ITEM TEST_OPS "test_gen_bkcl_id_op")
endif()
file(
GLOB DIST_TEST_OPS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"test_dist_*.py")
if(WITH_XPU_BKCL)
list(APPEND DIST_TEST_OPS test_gen_bkcl_id_op)
endif()
foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach()
foreach(TEST_OP ${DIST_TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach()
set_tests_properties(test_conv2d_op_xpu PROPERTIES TIMEOUT 120)
set_tests_properties(test_mul_op_xpu PROPERTIES TIMEOUT 120)
set_tests_properties(test_matmul_v2_op_xpu PROPERTIES TIMEOUT 900)
set_tests_properties(test_matmul_op_xpu PROPERTIES TIMEOUT 300)
set_tests_properties(test_collective_identity_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
set_tests_properties(test_collective_allgather_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
set_tests_properties(test_collective_allreduce_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
...@@ -128,7 +128,9 @@ if(WITH_TESTING) ...@@ -128,7 +128,9 @@ if(WITH_TESTING)
add_subdirectory(standalone_executor) add_subdirectory(standalone_executor)
add_subdirectory(tokenizer) add_subdirectory(tokenizer)
# add_subdirectory(white_list) # add_subdirectory(white_list)
add_subdirectory(xpu) if(WITH_XPU)
add_subdirectory(xpu)
endif()
endif() endif()
get_property(test_srcs GLOBAL PROPERTY TEST_SRCS) get_property(test_srcs GLOBAL PROPERTY TEST_SRCS)
......
if(WITH_XPU) if(WITH_XPU)
add_subdirectory(cpp) add_subdirectory(cpp)
endif() endif()
file(
GLOB TEST_OPS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WITH_XPU_BKCL)
list(REMOVE_ITEM TEST_OPS "test_gen_bkcl_id_op")
endif()
file(
GLOB DIST_TEST_OPS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"test_dist_*.py")
if(WITH_XPU_BKCL)
list(APPEND DIST_TEST_OPS test_gen_bkcl_id_op)
endif()
foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach()
foreach(TEST_OP ${DIST_TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach()
set_tests_properties(test_conv2d_op_xpu PROPERTIES TIMEOUT 120)
set_tests_properties(test_mul_op_xpu PROPERTIES TIMEOUT 120)
set_tests_properties(test_matmul_v2_op_xpu PROPERTIES TIMEOUT 900)
set_tests_properties(test_matmul_op_xpu PROPERTIES TIMEOUT 300)
set_tests_properties(test_collective_identity_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
set_tests_properties(test_collective_allgather_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
set_tests_properties(test_collective_allreduce_xpu
PROPERTIES LABELS "RUN_TYPE=DIST_KUNLUN")
...@@ -12,15 +12,21 @@ ...@@ -12,15 +12,21 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import numpy as np import numpy as np
sys.path.append('..')
sys.path.append('../../python/paddle/fluid/tests/unittests')
from eager_op_test import OpTest from eager_op_test import OpTest
from testsuite import append_loss_ops, create_op, set_input from get_test_cover_info import (
from white_list import no_grad_set_white_list, op_threshold_white_list
from xpu.get_test_cover_info import (
get_xpu_op_support_types, get_xpu_op_support_types,
is_empty_grad_op_type, is_empty_grad_op_type,
type_dict_str_to_numpy, type_dict_str_to_numpy,
) )
from testsuite import append_loss_ops, create_op, set_input
from white_list import no_grad_set_white_list, op_threshold_white_list
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
...@@ -52,11 +48,13 @@ class XPUTestAdadelta(XPUOpTestWrapper): ...@@ -52,11 +48,13 @@ class XPUTestAdadelta(XPUOpTestWrapper):
rho = 0.95 rho = 0.95
epsilon = 1e-6 epsilon = 1e-6
learning_rate = 1.0
self.inputs = { self.inputs = {
'Param': param, 'Param': param,
'Grad': grad, 'Grad': grad,
'AvgSquaredGrad': avg_squared_grad, 'AvgSquaredGrad': avg_squared_grad,
'AvgSquaredUpdate': avg_squared_update, 'AvgSquaredUpdate': avg_squared_update,
'LearningRate': np.array([learning_rate]).astype("float32"),
} }
self.attrs = {'rho': rho, 'epsilon': epsilon} self.attrs = {'rho': rho, 'epsilon': epsilon}
...@@ -107,11 +105,13 @@ class XPUTestAdadelta(XPUOpTestWrapper): ...@@ -107,11 +105,13 @@ class XPUTestAdadelta(XPUOpTestWrapper):
rho = 0.95 rho = 0.95
epsilon = 1e-6 epsilon = 1e-6
learning_rate = 1.0
self.inputs = { self.inputs = {
'Param': param, 'Param': param,
'Grad': grad, 'Grad': grad,
'AvgSquaredGrad': avg_squared_grad, 'AvgSquaredGrad': avg_squared_grad,
'AvgSquaredUpdate': avg_squared_update, 'AvgSquaredUpdate': avg_squared_update,
'LearningRate': np.array([learning_rate]).astype("float32"),
} }
avg_squared_grad_out = rho * avg_squared_grad + ( avg_squared_grad_out = rho * avg_squared_grad + (
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import numpy as np
import paddle
sys.path.append("..")
import unittest import unittest
from op_test_xpu import XPUOpTest import numpy as np
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,20 +12,16 @@ ...@@ -12,20 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
from functools import partial from functools import partial
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
Unit testing for affine_channel_op Unit testing for affine_channel_op
""" """
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
...@@ -21,14 +20,13 @@ import paddle ...@@ -21,14 +20,13 @@ import paddle
paddle.enable_static() paddle.enable_static()
sys.path.append("..")
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
class XPUTestAtanOp(XPUOpTestWrapper): class XPUTestAtanOp(XPUOpTestWrapper):
......
...@@ -12,13 +12,10 @@ ...@@ -12,13 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,13 +12,10 @@ ...@@ -12,13 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import paddle import paddle
sys.path.append("..")
paddle.enable_static() paddle.enable_static()
''' '''
def bilinear_interp_np(input, def bilinear_interp_np(input,
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -10,19 +10,15 @@ ...@@ -10,19 +10,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from test_collective_base_xpu import TestDistBase from get_test_cover_info import (
import paddle
from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import TestDistBase
import paddle
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import paddle import paddle
from paddle.fluid.tests.unittests.c_embedding_op_base import ( from paddle.fluid.tests.unittests.c_embedding_op_base import (
TestCEmbeddingCPU, TestCEmbeddingCPU,
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from test_collective_base_xpu import TestDistBase from get_test_cover_info import (
import paddle
from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import TestDistBase
import paddle
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,22 +12,19 @@ ...@@ -12,22 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from paddle.fluid import core from paddle.fluid import core
sys.path.append("..")
alignment = 256 alignment = 256
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from test_collective_base_xpu import TestDistBase from get_test_cover_info import (
import paddle
from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import TestDistBase
import paddle
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from test_collective_base_xpu import TestDistBase from get_test_cover_info import (
import paddle
from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import TestDistBase
import paddle
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,14 @@ ...@@ -12,18 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from get_test_cover_info import XPUOpTestWrapper, create_test_class
from test_collective_base_xpu import TestDistBase from test_collective_base_xpu import TestDistBase
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import XPUOpTestWrapper, create_test_class
paddle.enable_static() paddle.enable_static()
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from test_collective_base_xpu import TestDistBase from get_test_cover_info import (
import paddle
from paddle.fluid import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import TestDistBase
import paddle
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -13,22 +13,18 @@ ...@@ -13,22 +13,18 @@
# limitations under the License. # limitations under the License.
import os import os
import sys
import unittest import unittest
import numpy as np import numpy as np
from test_collective_base_xpu import DataTypeCast, TestDistBase from get_test_cover_info import (
import paddle
from paddle.framework import core
sys.path.append("..")
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_collective_base_xpu import DataTypeCast, TestDistBase
import paddle
from paddle.framework import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,14 +12,11 @@ ...@@ -12,14 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import XPUOpTestWrapper, create_test_class
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import XPUOpTestWrapper, create_test_class
import paddle import paddle
......
...@@ -13,19 +13,15 @@ ...@@ -13,19 +13,15 @@
# limitations under the License. # limitations under the License.
import random import random
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import OpTest, XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import OpTest, XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
...@@ -22,12 +19,12 @@ import numpy as np ...@@ -22,12 +19,12 @@ import numpy as np
import paddle import paddle
paddle.enable_static() paddle.enable_static()
from test_conv2d_op_xpu import XPUTestConv2DOp, XPUTestConv2DOp_v2 from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_conv2d_op_xpu import XPUTestConv2DOp, XPUTestConv2DOp_v2
class XPUTestDepthwiseConv2DOp(XPUOpTestWrapper): class XPUTestDepthwiseConv2DOp(XPUOpTestWrapper):
......
...@@ -12,11 +12,7 @@ ...@@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import warnings import warnings
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
import paddle
sys.path.append("..") import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
...@@ -23,7 +20,7 @@ import paddle ...@@ -23,7 +20,7 @@ import paddle
paddle.enable_static() paddle.enable_static()
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
...@@ -26,7 +23,7 @@ from paddle.fluid import Program, program_guard ...@@ -26,7 +23,7 @@ from paddle.fluid import Program, program_guard
paddle.enable_static() paddle.enable_static()
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -13,19 +13,18 @@ ...@@ -13,19 +13,18 @@
# limitations under the License. # limitations under the License.
import sys import sys
import numpy as np
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np
from eager_op_test import OpTest, skip_check_grad_ci from eager_op_test import OpTest, skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -13,12 +13,11 @@ ...@@ -13,12 +13,11 @@
# limitations under the License. # limitations under the License.
import sys import sys
import numpy as np
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np
from eager_op_test import OpTest, skip_check_grad_ci from eager_op_test import OpTest, skip_check_grad_ci
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest, skip_check_grad_ci from eager_op_test import OpTest, skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest, skip_check_grad_ci from eager_op_test import OpTest, skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -13,19 +13,18 @@ ...@@ -13,19 +13,18 @@
# limitations under the License. # limitations under the License.
import sys import sys
import numpy as np
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid.framework import convert_np_dtype_to_dtype_ from paddle.fluid.framework import convert_np_dtype_to_dtype_
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import convert_float_to_uint16 from eager_op_test import convert_float_to_uint16
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
import paddle
sys.path.append("..") import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,17 +12,15 @@ ...@@ -12,17 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,21 +12,15 @@ ...@@ -12,21 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,17 +12,15 @@ ...@@ -12,17 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,20 +12,15 @@ ...@@ -12,20 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import numpy as np
sys.path.append("..")
import unittest import unittest
from op_test_xpu import XPUOpTest import numpy as np
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
import paddle.incubate.nn.functional as incubate_f import paddle.incubate.nn.functional as incubate_f
......
...@@ -11,16 +11,11 @@ ...@@ -11,16 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import numpy as np
sys.path.append("..")
import unittest import unittest
import numpy as np
from get_test_cover_info import XPUOpTestWrapper, create_test_class
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import XPUOpTestWrapper, create_test_class
import paddle import paddle
import paddle.incubate.nn.functional as incubate_f import paddle.incubate.nn.functional as incubate_f
......
...@@ -13,19 +13,15 @@ ...@@ -13,19 +13,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -13,18 +13,15 @@ ...@@ -13,18 +13,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import _legacy_C_ops from paddle import _legacy_C_ops
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
# limitations under the License. # limitations under the License.
import os import os
import sys
import unittest import unittest
sys.path.append("..")
from multiprocessing import Process from multiprocessing import Process
from launch_function_helper import _find_free_port, wait from launch_function_helper import _find_free_port, wait
......
...@@ -12,22 +12,17 @@ ...@@ -12,22 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest
import numpy as np
sys.path.append("..")
import copy import copy
import math import math
import unittest
from op_test_xpu import XPUOpTest import numpy as np
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,23 +12,19 @@ ...@@ -12,23 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from paddle import fluid
from paddle.fluid import Program, program_guard
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid
from paddle.fluid import Program, program_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -12,22 +12,19 @@ ...@@ -12,22 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
from paddle import fluid
from paddle.fluid import Program, program_guard
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
from paddle import fluid
from paddle.fluid import Program, program_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from numpy import random from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from numpy import random
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -11,18 +11,15 @@ ...@@ -11,18 +11,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.nn.functional import kl_div from paddle.nn.functional import kl_div
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,23 +12,19 @@ ...@@ -12,23 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
from functools import reduce from functools import reduce
import numpy as np
import paddle
sys.path.append("..")
from operator import mul from operator import mul
from op_test_xpu import XPUOpTest import numpy as np
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest, convert_np_dtype_to_dtype_
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest, convert_np_dtype_to_dtype_
import paddle import paddle
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,15 +12,13 @@ ...@@ -12,15 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import paddle
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,21 +12,17 @@ ...@@ -12,21 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
np.random.seed(10) np.random.seed(10)
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,17 +12,14 @@ ...@@ -12,17 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..") from get_test_cover_info import (
from test_merged_momentum_op_xpu_base import TestMergedMomentumBase
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from test_merged_momentum_op_xpu_base import TestMergedMomentumBase
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,19 +12,16 @@ ...@@ -12,19 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest
import paddle import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
paddle.enable_static() paddle.enable_static()
from xpu.get_test_cover_info import ( from get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
......
...@@ -12,13 +12,10 @@ ...@@ -12,13 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import paddle import paddle
sys.path.append("..")
paddle.enable_static() paddle.enable_static()
''' '''
def nearest_neighbor_interp_np(X, def nearest_neighbor_interp_np(X,
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,22 +12,19 @@ ...@@ -12,22 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
from paddle import fluid
from paddle.fluid import core
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
from paddle import fluid
from paddle.fluid import core
paddle.enable_static() paddle.enable_static()
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,16 @@ ...@@ -12,19 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from test_pool2d_op import adaptive_end_index, adaptive_start_index
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
from test_pool2d_op import adaptive_end_index, adaptive_start_index
import paddle import paddle
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
import sys import sys
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
from get_test_cover_info import record_op_test
import paddle import paddle
from paddle.fluid.contrib.layers.nn import pow2_decay_with_linear_warmup from paddle.fluid.contrib.layers.nn import pow2_decay_with_linear_warmup
from paddle.optimizer.lr import LinearWarmup, PolynomialDecay from paddle.optimizer.lr import LinearWarmup, PolynomialDecay
sys.path.append("..")
from xpu.get_test_cover_info import record_op_test
def gen_pow2_warmup_op_lr(warmup_steps, total_steps, base_lr, end_lr, place): def gen_pow2_warmup_op_lr(warmup_steps, total_steps, base_lr, end_lr, place):
main = paddle.static.Program() main = paddle.static.Program()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -13,19 +13,15 @@ ...@@ -13,19 +13,15 @@
# limitations under the License. # limitations under the License.
import math import math
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..") import numpy as np
from test_sum_op import TestReduceOPTensorAxisBase from test_sum_op import TestReduceOPTensorAxisBase
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,22 +12,19 @@ ...@@ -12,22 +12,19 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
from paddle.fluid import core
from paddle.static import Program, program_guard
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
from paddle.fluid import core
from paddle.static import Program, program_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
import sys import sys
import unittest import unittest
import numpy as np sys.path.append('../../python/paddle/fluid/tests/unittests')
sys.path.append("..")
import numpy as np
from eager_op_test import OpTest from eager_op_test import OpTest
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -10,26 +10,26 @@ ...@@ -10,26 +10,26 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import random import random
import sys
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
sys.path.append("../rnn") sys.path.append('../../python/paddle/fluid/tests/unittests/rnn')
from convert import get_params_for_net from convert import get_params_for_net
from rnn_numpy import LSTM from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from rnn_numpy import LSTM
random.seed(2) random.seed(2)
np.set_printoptions(threshold=np.inf) np.set_printoptions(threshold=np.inf)
......
...@@ -12,19 +12,16 @@ ...@@ -12,19 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import math import math
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,20 +12,16 @@ ...@@ -12,20 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
type_dict_str_to_numpy, type_dict_str_to_numpy,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -21,12 +21,12 @@ import numpy as np ...@@ -21,12 +21,12 @@ import numpy as np
import paddle import paddle
sys.path.append("../") sys.path.append("../")
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
paddle.enable_static() paddle.enable_static()
np.set_printoptions(threshold=np.inf) np.set_printoptions(threshold=np.inf)
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -21,12 +21,12 @@ from functools import reduce ...@@ -21,12 +21,12 @@ from functools import reduce
import numpy as np import numpy as np
sys.path.append("../") sys.path.append("../")
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle.fluid import core from paddle.fluid import core
......
...@@ -12,19 +12,16 @@ ...@@ -12,19 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from scipy.special import expit, logit
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
from scipy.special import expit, logit
import paddle import paddle
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
np.random.seed(10) np.random.seed(10)
......
...@@ -12,20 +12,16 @@ ...@@ -12,20 +12,16 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from test_softmax_op import stable_softmax
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
from test_softmax_op import stable_softmax
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append("../../python/paddle/fluid/tests/unittests")
import numpy as np import numpy as np
from eager_op_test import skip_check_grad_ci from eager_op_test import skip_check_grad_ci
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,20 +12,17 @@ ...@@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -10,19 +10,15 @@ ...@@ -10,19 +10,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import tensor from paddle import tensor
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,17 +12,15 @@ ...@@ -12,17 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid, tensor from paddle import fluid, tensor
......
...@@ -12,21 +12,18 @@ ...@@ -12,21 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
import paddle
from paddle import fluid
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle
from paddle import fluid
paddle.enable_static() paddle.enable_static()
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
sys.path.append('../../python/paddle/fluid/tests/unittests')
import numpy as np import numpy as np
from test_uniform_random_op import ( from test_uniform_random_op import (
TestUniformRandomOp, TestUniformRandomOp,
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,18 +12,15 @@ ...@@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
......
...@@ -12,17 +12,15 @@ ...@@ -12,17 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
sys.path.append("..")
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -13,18 +13,16 @@ ...@@ -13,18 +13,16 @@
# limitations under the License. # limitations under the License.
import sys import sys
sys.path.append("..")
import unittest import unittest
import numpy as np import numpy as np
from op_test_xpu import XPUOpTest from get_test_cover_info import (
from test_softmax_op import stable_softmax
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
from test_softmax_op import stable_softmax
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -12,19 +12,15 @@ ...@@ -12,19 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import numpy as np import numpy as np
from get_test_cover_info import (
sys.path.append("..")
from op_test_xpu import XPUOpTest
from xpu.get_test_cover_info import (
XPUOpTestWrapper, XPUOpTestWrapper,
create_test_class, create_test_class,
get_xpu_op_support_types, get_xpu_op_support_types,
) )
from op_test_xpu import XPUOpTest
import paddle import paddle
from paddle import fluid from paddle import fluid
......
...@@ -406,7 +406,7 @@ class PRChecker: ...@@ -406,7 +406,7 @@ class PRChecker:
ut_list.append('md_placeholder') ut_list.append('md_placeholder')
onlyCommentsFilesOrXpu.append(f_judge) onlyCommentsFilesOrXpu.append(f_judge)
elif ( elif (
'tests/unittests/xpu' in f_judge 'test/xpu' in f_judge
or 'tests/unittests/npu' in f_judge or 'tests/unittests/npu' in f_judge
or 'op_npu.cc' in f_judge or 'op_npu.cc' in f_judge
): ):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册