提交 f385c341 编写于 作者: W WangXi 提交者: gongweibao

fix fleet collective api run on cpu, test=develop (#22064)

上级 ba8414d3
......@@ -38,6 +38,10 @@ class FleetCollectiveTest(unittest.TestCase):
import paddle.fluid.incubate.fleet.base.role_maker as role_maker
from paddle.fluid.incubate.fleet.collective import fleet, DistributedStrategy
if not fluid.core.is_compiled_with_cuda():
# Operator "gen_nccl_id" has not been registered
return
data = fluid.layers.data(name='X', shape=[1], dtype='float32')
hidden = fluid.layers.fc(input=data, size=10)
loss = fluid.layers.mean(hidden)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册