Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
03b42d9f
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
03b42d9f
编写于
12月 08, 2020
作者:
L
LoveAn
提交者:
GitHub
12月 08, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix unittest on windows, test=develop (#29365)
上级
22e6b9e3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
23 deletion
+48
-23
paddle/fluid/framework/details/broadcast_op_handle_test.cc
paddle/fluid/framework/details/broadcast_op_handle_test.cc
+1
-1
paddle/fluid/framework/details/fused_broadcast_op_handle_test.cc
...fluid/framework/details/fused_broadcast_op_handle_test.cc
+1
-1
paddle/fluid/framework/parallel_executor.cc
paddle/fluid/framework/parallel_executor.cc
+9
-7
paddle/scripts/paddle_build.bat
paddle/scripts/paddle_build.bat
+7
-7
python/paddle/fluid/contrib/slim/tests/CMakeLists.txt
python/paddle/fluid/contrib/slim/tests/CMakeLists.txt
+18
-0
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+10
-6
python/paddle/fluid/tests/unittests/test_gpu_package_without_gpu_device.py
...id/tests/unittests/test_gpu_package_without_gpu_device.py
+2
-1
未找到文件。
paddle/fluid/framework/details/broadcast_op_handle_test.cc
浏览文件 @
03b42d9f
...
...
@@ -34,7 +34,7 @@ TEST(BroadcastTester, TestCPUBroadcastTestSelectedRows) {
test_op
.
TestBroadcastSelectedRows
(
input_scope_idx
);
}
#if
def PADDLE_WITH_CUDA
#if
defined(PADDLE_WITH_CUDA) && defined(PADDLE_WITH_NCCL)
TEST
(
BroadcastTester
,
TestGPUBroadcastTestLodTensor
)
{
TestBroadcastOpHandle
test_op
;
size_t
input_scope_idx
=
0
;
...
...
paddle/fluid/framework/details/fused_broadcast_op_handle_test.cc
浏览文件 @
03b42d9f
...
...
@@ -160,7 +160,7 @@ TEST(FusedBroadcastTester, CPUSelectedRows) {
test_op
.
TestFusedBroadcastSelectedRows
(
input_scope_idxes
);
}
#if
def PADDLE_WITH_CUDA
#if
defined(PADDLE_WITH_CUDA) && defined(PADDLE_WITH_NCCL)
TEST
(
FusedBroadcastTester
,
GPULodTensor
)
{
TestFusedBroadcastOpHandle
test_op
;
std
::
vector
<
size_t
>
input_scope_idxes
=
{
0
,
1
};
...
...
paddle/fluid/framework/parallel_executor.cc
浏览文件 @
03b42d9f
...
...
@@ -537,13 +537,15 @@ ParallelExecutor::ParallelExecutor(const std::vector<platform::Place> &places,
#endif
#if defined(PADDLE_WITH_CUDA) && !defined(PADDLE_WITH_NCCL)
PADDLE_ENFORCE_EQ
(
places
.
size
(),
1
,
platform
::
errors
::
PermissionDenied
(
"Your machine has multiple cards, "
"but the WITH_NCCL option is not turned on during compilation, "
"and you cannot use multi-card training or prediction. "
"Please recompile and turn on the WITH_NCCL option."
));
if
(
member_
->
use_cuda_
)
{
PADDLE_ENFORCE_EQ
(
places
.
size
(),
1
,
platform
::
errors
::
PermissionDenied
(
"Your machine has multiple cards, "
"but the WITH_NCCL option is not turned on during compilation, "
"and you cannot use multi-card training or prediction. "
"Please recompile and turn on the WITH_NCCL option."
));
}
#endif
VLOG
(
1
)
<<
string
::
Sprintf
(
...
...
paddle/scripts/paddle_build.bat
浏览文件 @
03b42d9f
...
...
@@ -404,18 +404,18 @@ set CUDA_DEVICE_COUNT=1
rem TODO: fix these unittest that is bound to fail
rem /*==================Disabled Windows unite==============================*/
set
diable_wingpu_test
=
broadcast_op_test
^|
fused_broadcast_op_test
^|
test_analysis_predictor
^|
test_model
^|
test_add_reader_dependency
^|
test_bilateral_slice_op
^|^
set
diable_wingpu_test
=
test_analysis_predictor
^|
test_model
^|
test_add_reader_dependency
^|
test_bilateral_slice_op
^|^
test_cholesky_op
^|
test_dataloader_early_reset
^|
test_decoupled_py_reader
^|
test_decoupled_py_reader_data_check
^|
test_eager_deletion_delete_vars
^|^
test_eager_deletion_while_op
^|
test_feed_data_check_shape_type
^|
test_fetch_lod_tensor_array
^|
test_fleet_base_single
^|
test_fuse_all_reduce_pass
^|
test_fuse_elewise_add_act_pass
^|^
test_fuse_optimizer_pass
^|
test_generator_dataloader
^|
test_
gpu_package_without_gpu_device
^|
test_ir_memory_optimize_ifelse_op
^|
test_ir_memory_optimize_nl
p
^|
test_lr_scheduler
^|^
test_multiprocess_dataloader_iterable_dataset_dynamic
^|
test_multiprocess_dataloader_iterable_dataset_static
^|
test_
nvprof
^|
test_
parallel_dygraph_sync_batch_norm
^|
test_parallel_executor_drop_scope
^|^
test_fuse_optimizer_pass
^|
test_generator_dataloader
^|
test_
ir_memory_optimize_ifelse_o
p
^|
test_lr_scheduler
^|^
test_multiprocess_dataloader_iterable_dataset_dynamic
^|
test_multiprocess_dataloader_iterable_dataset_static
^|
test_parallel_dygraph_sync_batch_norm
^|
test_parallel_executor_drop_scope
^|^
test_parallel_executor_dry_run
^|
test_partial_eager_deletion_transformer
^|
test_prune
^|
test_py_reader_combination
^|
test_py_reader_pin_memory
^|^
test_py_reader_push_pop
^|
test_py_reader_using_executor
^|
test_reader_reset
^|
test_update_loss_scaling_op
^|
test_imperative_static_runner_while
^|^
test_
parallel_executor_transformer
^|
test_parallel_executor_transformer_auto_growth
^|
test_
flags_use_mkldnn
^|
test_optimizer_in_control_flow
^|
test_fuse_bn_act_pass
^|^
test_flags_use_mkldnn
^|
test_optimizer_in_control_flow
^|
test_fuse_bn_act_pass
^|^
test_fuse_bn_add_act_pass
^|
test_activation_mkldnn_op
^|
test_tsm
^|
test_gru_rnn_op
^|
test_rnn_op
^|
test_simple_rnn_op
^|
test_pass_builder
^|
test_lstm_cudnn_op
^|
test_inplace_addto_strategy
^|^
test_ir_inplace_pass
^|
test_ir_memory_optimize_pass
^|
test_memory_reuse_exclude_feed_var
^|
test_mix_precision_all_reduce_fuse
^|
test_parallel_executor_pg
^|
test_print_op
^|
test_py_func_op
^|^
test_weight_decay
^|
test_mobile_net
^|
test_graph
^|
test_imperative_out_scale
^|
test_imperative_qat
^|
test_imperative_qat_channelwise
^|
test_moving_average_abs_max_scale_op
^|
^
test_
quantization_pass
^|
test_quantization_scale_pass
^|
test_user_defined_quantization
^|
test_
conv2d_int8_mkldnn_op
^|^
test_weight_decay
^|
test_mobile_net
^|^
test_conv2d_int8_mkldnn_op
^|^
test_crypto
^|
test_callbacks
^|
test_program_prune_backward
^|
test_imperative_ocr_attention_model
rem /*===============================================================*/
...
...
@@ -430,7 +430,7 @@ test_imperative_save_load^|test_imperative_selected_rows_to_lod_tensor^|test_imp
test_masked_select_op
^|
test_multiclass_nms_op
^|
test_naive_best_fit_gpu_memory_limit
^|
test_nearest_interp_v2_op
^|
test_nn_grad
^|
test_norm_nn_grad
^|^
test_normal
^|
test_pool3d_op
^|
test_pool2d_op
^|
test_prroi_pool_op
^|
test_regularizer
^|
test_regularizer_api
^|
test_sgd_op
^|
test_softmax_with_cross_entropy_op
^|
test_static_save_load
^|^
test_trilinear_interp_op
^|
test_trilinear_interp_v2_op
^|
test_bilinear_interp_op
^|
test_nearest_interp_op
^|
test_sequence_conv
^|
test_transformer
^|^
test_beam_search_decoder
^|
test_argsort_op
^|
test_eager_deletion_gru_net
^|
test_lstmp_op
^|
test_label_semantic_roles
^|
test_user_defined_quantization
^|
^
test_beam_search_decoder
^|
test_argsort_op
^|
test_eager_deletion_gru_net
^|
test_lstmp_op
^|
test_label_semantic_roles
^|^
test_machine_translation
^|
test_row_conv_op
^|
test_deformable_conv_op
^|
test_inplace_softmax_with_cross_entropy
^|
test_conv2d_transpose_op
^|
test_conv3d_transpose_op
^|^
test_cyclic_cifar_dataset
^|
test_deformable_psroi_pooling
^|
test_elementwise_mul_op
^|
test_imperative_auto_mixed_precision
^|
test_imperative_optimizer_v2
^|
test_imperative_ptb_rnn_sorted_gradient
^|^
test_imperative_save_load_v2
^|
test_nan_inf
^|
test_norm_op
^|
test_reduce_op
^|
test_sigmoid_cross_entropy_with_logits_op
^|
test_stack_op
^|
test_strided_slice_op
^|
test_transpose_op
...
...
python/paddle/fluid/contrib/slim/tests/CMakeLists.txt
浏览文件 @
03b42d9f
...
...
@@ -269,6 +269,24 @@ list(REMOVE_ITEM TEST_OPS
LIST
(
REMOVE_ITEM TEST_OPS test_auto_pruning
)
LIST
(
REMOVE_ITEM TEST_OPS test_filter_pruning
)
# fix
if
(
WIN32
)
SET
(
SINGLE_CARD_TEST_OPS
test_user_defined_quantization
test_quantization_scale_pass
test_quantization_pass
test_moving_average_abs_max_scale_op
test_imperative_qat_channelwise
test_imperative_qat
test_imperative_out_scale
test_graph
)
LIST
(
REMOVE_ITEM TEST_OPS
${
SINGLE_CARD_TEST_OPS
}
)
foreach
(
src
${
SINGLE_CARD_TEST_OPS
}
)
py_test
(
${
src
}
SRCS
${
src
}
.py ENVS CUDA_VISIBLE_DEVICES=0
)
endforeach
()
endif
()
foreach
(
src
${
TEST_OPS
}
)
py_test
(
${
src
}
SRCS
${
src
}
.py
)
endforeach
()
...
...
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
03b42d9f
...
...
@@ -81,10 +81,6 @@ if(NOT WITH_GPU OR WIN32)
LIST
(
REMOVE_ITEM TEST_OPS test_collective_allgather_api
)
endif
()
if
(
WIN32
)
LIST
(
REMOVE_ITEM TEST_OPS test_multiprocess_reader_exception
)
endif
()
if
(
WIN32
)
LIST
(
REMOVE_ITEM TEST_OPS test_multiprocess_reader_exception
)
LIST
(
REMOVE_ITEM TEST_OPS test_trainer_desc
)
...
...
@@ -96,6 +92,8 @@ if(WIN32)
LIST
(
REMOVE_ITEM TEST_OPS test_fleet_rolemaker_3
)
LIST
(
REMOVE_ITEM TEST_OPS test_fleet_unitaccessor
)
LIST
(
REMOVE_ITEM TEST_OPS test_ps_dispatcher
)
LIST
(
REMOVE_ITEM TEST_OPS test_ir_memory_optimize_nlp
)
LIST
(
REMOVE_ITEM TEST_OPS test_nvprof
)
# TODO: Fix these unittests failed on Windows
LIST
(
REMOVE_ITEM TEST_OPS test_debugger
)
...
...
@@ -558,7 +556,11 @@ endif()
py_test_modules
(
test_parallel_executor_crf MODULES test_parallel_executor_crf
)
py_test_modules
(
test_parallel_executor_profiler MODULES test_parallel_executor_profiler
)
py_test_modules
(
test_parallel_executor_transformer MODULES test_parallel_executor_transformer
)
py_test_modules
(
test_parallel_executor_transformer_auto_growth MODULES test_parallel_executor_transformer_auto_growth ENVS FLAGS_allocator_strategy=auto_growth
)
if
(
WIN32
)
py_test_modules
(
test_parallel_executor_transformer_auto_growth MODULES test_parallel_executor_transformer_auto_growth ENVS FLAGS_allocator_strategy=auto_growth CUDA_VISIBLE_DEVICES=0
)
else
()
py_test_modules
(
test_parallel_executor_transformer_auto_growth MODULES test_parallel_executor_transformer_auto_growth ENVS FLAGS_allocator_strategy=auto_growth
)
endif
()
py_test_modules
(
test_data_norm_op MODULES test_data_norm_op
)
py_test_modules
(
test_fuse_bn_act_pass MODULES test_fuse_bn_act_pass ENVS FLAGS_cudnn_deterministic=1 FLAGS_cudnn_batchnorm_spatial_persistent=1 FLAGS_conv_workspace_size_limit=1000
)
...
...
@@ -696,7 +698,9 @@ set_tests_properties(test_parallel_executor_transformer PROPERTIES TIMEOUT 120)
set_tests_properties
(
test_elementwise_div_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_regularizer_api PROPERTIES TIMEOUT 150
)
set_tests_properties
(
test_multiclass_nms_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_ir_memory_optimize_nlp PROPERTIES TIMEOUT 120
)
if
(
NOT WIN32
)
set_tests_properties
(
test_ir_memory_optimize_nlp PROPERTIES TIMEOUT 120
)
endif
()
set_tests_properties
(
test_add_reader_dependency PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_bilateral_slice_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_buffer_shared_memory_reuse_pass PROPERTIES TIMEOUT 120
)
...
...
python/paddle/fluid/tests/unittests/test_gpu_package_without_gpu_device.py
浏览文件 @
03b42d9f
...
...
@@ -42,7 +42,8 @@ assert x.place.is_gpu_place() is False, "There is no CUDA device, but Tensor's p
ps_proc
=
subprocess
.
Popen
(
ps_cmd
.
strip
().
split
(
" "
),
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stderr
=
subprocess
.
PIPE
,
env
=
os
.
environ
)
stdout
,
stderr
=
ps_proc
.
communicate
()
assert
'CPU device will be used by default'
in
str
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录