未验证 提交 d69df9bf 编写于 作者: W WangXi 提交者: GitHub

Add wrong info when use DGC in cpu (#22515)

上级 2235ee1a
......@@ -1084,6 +1084,10 @@ class DGCMomentumOptimizer(Optimizer):
name=None):
if framework.in_dygraph_mode():
raise Exception("In dygraph, don't support DGCMomentumOptimizer.")
assert core.is_compiled_with_cuda(), \
"Paddle is not compiled with CUDA. DGC is only support GPU for now."
assert learning_rate is not None
assert momentum is not None
super(DGCMomentumOptimizer, self).__init__(
......
......@@ -601,12 +601,13 @@ wlist_ignore = [
'PRelu.forward', 'Recall.update', 'start_gperf_profiler',
'TreeConv.forward', 'Conv2D.forward', 'Switch.default', 'elementwise_mod',
'Precision.update', 'WeightedAverage.eval', 'Conv3D.forward',
'Embedding.forward', 'Recall.eval', 'FC.forward', 'While.block'
'Embedding.forward', 'Recall.eval', 'FC.forward', 'While.block',
'DGCMomentumOptimizer'
]
# only white on CPU
gpu_not_white = [
"deformable_conv", "cuda_places", "CUDAPinnedPlace", "CUDAPlace",
"cuda_profiler"
"cuda_profiler", 'DGCMomentumOptimizer'
]
wlist = wlist_temp + wlist_inneed + wlist_ignore
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册