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
6 changes: 3 additions & 3 deletions test/deprecated/legacy_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if(WIN32)
list(REMOVE_ITEM TEST_OPS test_multiprocess_reader_exception)
list(REMOVE_ITEM TEST_OPS test_trainer_desc)
list(REMOVE_ITEM TEST_OPS test_checkpoint_notify_op)
list(REMOVE_ITEM TEST_OPS test_downpoursgd)
list(REMOVE_ITEM TEST_OPS test_downpoursgd_deprecated)
list(REMOVE_ITEM TEST_OPS test_fleet)
list(REMOVE_ITEM TEST_OPS test_fleet_nocvm_1)
list(REMOVE_ITEM TEST_OPS test_fleet_rolemaker)
Expand Down Expand Up @@ -453,8 +453,8 @@ endif()

# Some ops need to check results when gc is enabled
# Currently, only ops that register NoNeedBufferVarsInference need to do this test
set(TEST_OPS_WITH_GC test_affine_channel_op test_gather_nd_op test_lod_reset_op
test_scatter_op test_slice_op)
set(TEST_OPS_WITH_GC test_affine_channel_op test_gather_nd_op test_scatter_op
test_slice_op)

foreach(TEST_OP ${TEST_OPS_WITH_GC})
list(REMOVE_ITEM TEST_OPS ${TEST_OP})
Expand Down
26 changes: 18 additions & 8 deletions test/deprecated/legacy_test/test_complex_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,24 @@ def test_attrs(self):
self.compare()

def test_convert_np_dtype_to_dtype(self):
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.VarDesc.VarType.COMPLEX64,
)
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.VarDesc.VarType.COMPLEX64,
)
if paddle.framework.use_pir_api():
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.DataType.COMPLEX64,
)
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.DataType.COMPLEX64,
)
else:
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.VarDesc.VarType.COMPLEX64,
)
self.assertEqual(
convert_np_dtype_to_dtype_(np.complex64),
core.VarDesc.VarType.COMPLEX64,
)

def test_convert_dtype(self):
self.assertEqual(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,5 @@ def test_downpour_opt_work(self):


if __name__ == "__main__":
paddle.enable_static()
unittest.main()
11 changes: 8 additions & 3 deletions test/legacy_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ endif()
if(WIN32)
list(REMOVE_ITEM TEST_OPS test_trainer_desc)
list(REMOVE_ITEM TEST_OPS test_checkpoint_notify_op)
list(REMOVE_ITEM TEST_OPS test_downpoursgd)
list(REMOVE_ITEM TEST_OPS test_downpoursgd_deprecated)
list(REMOVE_ITEM TEST_OPS test_fleet)
list(REMOVE_ITEM TEST_OPS test_fleet_nocvm_1)
list(REMOVE_ITEM TEST_OPS test_fleet_rolemaker)
Expand Down Expand Up @@ -484,8 +484,13 @@ endif()
# Some ops need to check results when gc is enabled
# Currently, only ops that register NoNeedBufferVarsInference need to do this test
set(TEST_OPS_WITH_GC
test_concat_op test_elementwise_add_op test_lookup_table_op
test_elementwise_sub_op test_gather_op test_mean_op)
test_concat_op
test_elementwise_add_op
test_lookup_table_op
test_elementwise_sub_op
test_gather_op
test_mean_op
test_lod_reset_op)

foreach(TEST_OP ${TEST_OPS_WITH_GC})
list(REMOVE_ITEM TEST_OPS ${TEST_OP})
Expand Down
4 changes: 2 additions & 2 deletions tools/parallel_UT_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
'mmap_allocator_test',
'test_reshape_transpose_matmul_mkldnn_fuse_pass',
'test_communicator_async',
'test_downpoursgd',
'test_downpoursgd_deprecated',
'variable_test',
'test_quantization_mkldnn_pass',
'test_quantize_mkldnn_op',
Expand Down Expand Up @@ -1836,7 +1836,7 @@
'test_dyn_rnn',
'test_dygraph_mode_of_unittest',
'test_dpsgd_op',
'test_downpoursgd',
'test_downpoursgd_deprecated',
'test_download',
'test_distributions',
'test_distributed_reader',
Expand Down
2 changes: 1 addition & 1 deletion tools/static_mode_white_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
'test_distributed_strategy',
'test_distributions',
'test_dot_op',
'test_downpoursgd',
'test_downpoursgd_deprecated',
'test_dpsgd_op',
'test_dropout_op',
'test_dygraph_multi_forward',
Expand Down