提交 e206c636 编写于 作者: T typhoonzero

update by comment, add WITH_DISTRIBUTE switch

上级 b9d9b11c
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(NOT WITH_DISTRIBUTE)
list(REMOVE_ITEM TEST_OPS test_recv_op)
endif(NOT WITH_DISTRIBUTE)
foreach(src ${TEST_OPS})
py_test(${src} SRCS ${src}.py)
endforeach()
......
......@@ -47,7 +47,6 @@ class TestRecvOp(unittest.TestCase):
o = layers.scale(x=x, scale=10.0)
main.global_block().create_var(
name=o.name, psersistable=False, dtype=o.dtype, shape=o.shape)
print main
exe = fluid.Executor(place)
exe.run(main)
......@@ -61,16 +60,9 @@ class TestRecvOp(unittest.TestCase):
append_batch_size=False)
fluid.initializer.Constant(value=1.0)(x, main.global_block())
layers.Send("127.0.0.1:6174", [x], [x])
print main
exe = fluid.Executor(place)
exe.run(main)
if __name__ == "__main__":
unittest.main()
# test = TestRecvOp()
# place = fluid.CPUPlace()
# if sys.argv[1] == "server":
# test.init_serv(place)
# else:
# test.init_client(place)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册