提交 c24da0d3 编写于 作者: T typhoonzero

update unit test split var

上级 5faebab3
......@@ -5,3 +5,4 @@ foreach(src ${TEST_OPS})
endforeach()
add_subdirectory(book)
add_subdirectory(book_distribute)
......@@ -2,6 +2,7 @@ import math
import unittest
from paddle.v2.fluid.distribute_transpiler import split_dense_variable
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import random
......@@ -19,9 +20,9 @@ class TestSplitVar(unittest.TestCase):
program = fluid.Program()
for shape in shapes:
var = program.global_block().create_var(
name=str(random.randint(10000)),
name=str(random.randint(10000, 99999)),
persistable=True,
dtype=core.VarDesc.VarType.LOD_TENSOR,
# dtype=core.VarDesc.VarType.LOD_TENSOR,
shape=shape)
var_list.append(var)
blocks = split_dense_variable(var_list, 10)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册