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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/legacy_test/test_gammaincc_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,11 @@ def init_dtype_type(self):


class TestGammainccOp_ZeroSize(TestGammainccOp):

def init_shape(self):
self.shape = (0, 40)


class TestGammainccOp_ZeroSize2(TestGammainccOp):

def init_shape(self):
self.shape = (0, 0)

Expand Down
4 changes: 0 additions & 4 deletions test/legacy_test/test_gather_nd_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ def test_check_grad(self):

# Test Python API
class TestGatherNdOpAPI(unittest.TestCase):

def test_case1(self):
with static_guard():
x1 = paddle.static.data(
Expand Down Expand Up @@ -596,7 +595,6 @@ def test_case3(self):

# Test Raise Index Error
class TestGatherNdOpRaise(unittest.TestCase):

def test_check_raise(self):
def check_raise_is_test():
with static_guard():
Expand All @@ -617,7 +615,6 @@ def check_raise_is_test():


class TestGatherNdError(unittest.TestCase):

def test_error1(self):
with (
static_guard(),
Expand Down Expand Up @@ -661,7 +658,6 @@ def test_index_dtype():


class TestGatherNdAPI2(unittest.TestCase):

def test_static(self):
with base.program_guard(base.Program(), base.Program()):
data1 = paddle.static.data('data1', shape=[-1, 2], dtype='float64')
Expand Down
3 changes: 0 additions & 3 deletions test/legacy_test/test_gather_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ def test_check_grad(self):


class API_TestGather(unittest.TestCase):

def test_out1(self):
with base.program_guard(base.Program(), base.Program()):
data1 = paddle.static.data('data1', shape=[-1, 2], dtype='float64')
Expand Down Expand Up @@ -813,7 +812,6 @@ def test_static_graph():


class TestGathertError(unittest.TestCase):

def test_error1(self):
with paddle.static.program_guard(
paddle.static.Program(), paddle.static.Program()
Expand Down Expand Up @@ -887,7 +885,6 @@ def test_axis_maxsize():


class TestCheckOutType(unittest.TestCase):

def test_out_type(self):
data = paddle.static.data(shape=[16, 10], dtype='int64', name='x')
index = paddle.static.data(shape=[4], dtype='int64', name='index')
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_gather_tree_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def backtrace(ids, parents):


class TestGatherTreeOpAPI(unittest.TestCase):

def test_case(self):
paddle.enable_static()
ids = paddle.static.data(name='ids', shape=[5, 2, 2], dtype='int64')
Expand All @@ -78,7 +77,6 @@ def test_case2(self):


class TestGatherTreeOpError(unittest.TestCase):

def test_errors(self):
paddle.enable_static()
with program_guard(Program(), Program()):
Expand Down
3 changes: 0 additions & 3 deletions test/legacy_test/test_gelu_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,11 @@ def test_cases(self):


class TestGeluError(unittest.TestCase):

def setUp(self):
x = np.random.uniform(-1, 1, size=(11, 17)).astype(np.float32)
self.x = paddle.to_tensor(x)

def test_gelu_op_error(self):

def test_type_error1():
y = F.gelu(self.x, "tan")

Expand All @@ -219,7 +217,6 @@ def test_type_error2():
self.assertRaises(TypeError, test_type_error2)

def test_gelu_class_error(self):

def test_type_error1():
func = nn.GELU("tan")
y = func(self.x)
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_graph_send_recv_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ def compute_graph_send_recv_for_min_max(inputs, attributes):


class API_GraphSendRecvOpTest(unittest.TestCase):

def test_static(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down Expand Up @@ -541,7 +540,6 @@ def test_out_size_tensor_static(self):


class API_GeometricSendURecvTest(unittest.TestCase):

def test_static(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_grid_sample_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def load_tests(loader, standard_tests, pattern):


class TestGridSampleAPI(unittest.TestCase):

def test_errors(self):
with self.assertRaises(ValueError):
x = paddle.randn([1, 1, 3, 3])
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_i1_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def setUp(self):
self.place = get_places()

def test_api_static(self):

def run(place):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_i1e_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def setUp(self):
self.place = get_places()

def test_api_static(self):

def run(place):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
3 changes: 0 additions & 3 deletions test/legacy_test/test_increment.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class TestIncrement(unittest.TestCase):

def test_api(self):
paddle.enable_static()
with base.program_guard(base.Program(), base.Program()):
Expand Down Expand Up @@ -62,7 +61,6 @@ def test_no_inplace_increment(self):


class TestInplaceApiWithDataTransform(unittest.TestCase):

def test_increment(self):
if base.core.is_compiled_with_cuda():
paddle.enable_static()
Expand All @@ -77,7 +75,6 @@ def test_increment(self):


class TestIncrement_ZeroSize(unittest.TestCase):

def test_api(self):
with base.dygraph.guard():
input = paddle.randn(shape=[0]).astype('int64')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,4 @@ def test_dygraph(self):


if __name__ == "__main__":

unittest.main()
1 change: 0 additions & 1 deletion test/legacy_test/test_incubate_moe_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,4 @@ def test_k_gt_2(


if __name__ == "__main__":

unittest.main()
2 changes: 0 additions & 2 deletions test/legacy_test/test_incubate_moe_gate_dispatch_w_permute.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@


class TestFused(unittest.TestCase):

def test_moe_ops(self):
"""
test `moe-ops` w/ bias
Expand Down Expand Up @@ -202,5 +201,4 @@ def test_moe_permute_ops(self):


if __name__ == "__main__":

unittest.main()
1 change: 0 additions & 1 deletion test/legacy_test/test_index_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def test_dygraph(self):


class TestIndexFillAPI_ZeroSize2(TestIndexFillAPI_ZeroSize):

def init_setting(self):
self.dtype_np = 'float64'
self.index_type = 'int64'
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_index_sample_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def config(self):


class TestIndexSampleOp_ZeroSize2(TestIndexSampleOp_ZeroSize):

def config(self):
self.x_shape = (0, 20)
self.x_type = "float64"
Expand Down Expand Up @@ -247,7 +246,6 @@ def config(self):


class TestIndexSampleShape(unittest.TestCase):

def test_shape(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_inference_model_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class TestLoadInferenceModelError(unittest.TestCase):

def test_load_model_not_exist(self):
place = core.CPUPlace()
exe = executor.Executor(place)
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def test_multiply_dynamic_case5(self):


class TestMultiplyError(unittest.TestCase):

def test_errors_static_case1(self):
# test static computation graph: dtype can not be int8
paddle.enable_static()
Expand Down
5 changes: 0 additions & 5 deletions test/legacy_test/test_interp_recompute_scale_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ def linear_interp_np(

class TestBilinearInterpOpAPI_RecomputeScaleFactor(unittest.TestCase):
def test_case(self):

if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
Expand Down Expand Up @@ -284,7 +283,6 @@ def test_case(self):

class TestBilinearInterpOpAPI_RecomputeScaleFactorList(unittest.TestCase):
def test_case(self):

if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
Expand Down Expand Up @@ -330,7 +328,6 @@ class TestBilinearInterpOpAPI_RecomputeScaleFactorDifferentTensors(
unittest.TestCase
):
def test_case(self):

if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
Expand Down Expand Up @@ -422,7 +419,6 @@ def test_case(self):

class TestNearestInterpOpAPI_RecomputeScaleFactor(unittest.TestCase):
def test_case(self):

if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
Expand Down Expand Up @@ -511,7 +507,6 @@ def test_case(self):

class TestInterpRecomputeScaleFactorError(unittest.TestCase):
def test_size_and_recompute_scale_factor_error(self):

if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
else:
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_is_empty_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def setUp(self):


class TestIsEmptyOpError(unittest.TestCase):

def test_errors(self):
paddle.enable_static()
with paddle.static.program_guard(
Expand Down
4 changes: 0 additions & 4 deletions test/legacy_test/test_isclose_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def set_args(self):


class TestIscloseStatic(unittest.TestCase):

def test_api_case(self):
paddle.enable_static()
x_data = np.random.rand(10, 10)
Expand Down Expand Up @@ -204,7 +203,6 @@ def test_equal_nan():


class TestIscloseOpFp16(unittest.TestCase):

def test_fp16(self):
if core.is_compiled_with_cuda():
x_data = np.random.rand(10, 10).astype('float16')
Expand Down Expand Up @@ -263,7 +261,6 @@ def test_check_output(self):


class TestIscloseOpCp64(unittest.TestCase):

def test_cp64(self):
x_data = (
np.random.rand(10, 10) + 1.0j * np.random.rand(10, 10)
Expand All @@ -285,7 +282,6 @@ def test_cp64(self):


class TestIscloseOpCp128(unittest.TestCase):

def test_cp128(self):
x_data = (
np.random.rand(10, 10) + 1.0j * np.random.rand(10, 10)
Expand Down