未验证 提交 83284c8c 编写于 作者: J Jiangxinz 提交者: GitHub

fix undef var (#33780)

上级 621d8a71
...@@ -136,7 +136,7 @@ class AscendHelper(object): ...@@ -136,7 +136,7 @@ class AscendHelper(object):
def dtype2np(self, index): def dtype2np(self, index):
assert index in self.dtype2np_map, "index[%d] is not supported %d" % ( assert index in self.dtype2np_map, "index[%d] is not supported %d" % (
dtype) index)
return self.dtype2np_map[index] return self.dtype2np_map[index]
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
from __future__ import print_function from __future__ import print_function
import paddle import paddle
import unittest
from paddle.fluid.contrib import sparsity from paddle.fluid.contrib import sparsity
from paddle.fluid.tests.unittests.asp.asp_pruning_base import TestASPHelperPruningBase from paddle.fluid.tests.unittests.asp.asp_pruning_base import TestASPHelperPruningBase
......
...@@ -27,6 +27,7 @@ from contextlib import closing ...@@ -27,6 +27,7 @@ from contextlib import closing
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.unique_name as nameGen import paddle.fluid.unique_name as nameGen
from paddle.fluid import core from paddle.fluid import core
from six import string_types
class TestCollectiveRunnerBase(object): class TestCollectiveRunnerBase(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册