“feb2e476650b20f8b6caba46ba1d9a450ba990b7”上不存在“paddle/cinn/utils/error.cc”
未验证 提交 88b986a6 编写于 作者: 张春乔 提交者: GitHub

[CodeStyle][CINN] ruff F401,F632,F811 in test/cinn (#55013)

上级 3cca2a87
...@@ -103,8 +103,5 @@ ignore = [ ...@@ -103,8 +103,5 @@ ignore = [
"F403", "F403",
] ]
"test/cinn/**" = [ "test/cinn/**" = [
"F401",
"F403", "F403",
"F632",
"F811",
] ]
...@@ -16,7 +16,6 @@ import os ...@@ -16,7 +16,6 @@ import os
import shutil import shutil
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.auto_schedule.cost_model import CostModel from cinn.auto_schedule.cost_model import CostModel
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import sys
import numpy
import numpy as np
import paddle import paddle
from paddle import fluid, static from paddle import fluid, static
......
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
""" """
A fake model with multiple FC layers to test CINN on a more complex model. A fake model with multiple FC layers to test CINN on a more complex model.
""" """
import os
import sys
import numpy
import numpy as np
import paddle import paddle
from paddle import fluid, static from paddle import fluid, static
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import sys
import numpy
import numpy as np
import paddle import paddle
from paddle import fluid, static from paddle import fluid, static
......
...@@ -17,18 +17,17 @@ ...@@ -17,18 +17,17 @@
import logging import logging
import os import os
import sys import sys
from ast import arg
from cinn.common import is_compiled_with_cuda from cinn.common import is_compiled_with_cuda
from cinn.framework import Scope from cinn.framework import Scope
from cinn.frontend import NetBuilder, PaddleModelConvertor from cinn.frontend import PaddleModelConvertor
import paddle import paddle
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.static import Variable as PaddleVariable from paddle.static import Variable as PaddleVariable
sys.path.append("/work/dev_CINN/build/python/tests") sys.path.append("/work/dev_CINN/build/python/tests")
from test.cinn.ops.op_test import OpTest, OpTestTool from test.cinn.ops.op_test import OpTest
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO').upper()) logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO').upper())
logger = logging.getLogger(name="op_test") logger = logging.getLogger(name="op_test")
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle
class TestAssignValueOp(OpMapperTest): class TestAssignValueOp(OpMapperTest):
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle
class TestGaussianRandomOp(OpMapperTest): class TestGaussianRandomOp(OpMapperTest):
......
...@@ -14,11 +14,9 @@ ...@@ -14,11 +14,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import functools
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle
class TestRandIntOp(OpMapperTest): class TestRandIntOp(OpMapperTest):
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_mapper_test import OpMapperTest, logger from op_mapper_test import OpMapperTest
import paddle import paddle
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle
class TestUniformRandomOp(OpMapperTest): class TestUniformRandomOp(OpMapperTest):
......
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
import unittest import unittest
import numpy as np from op_mapper_test import OpMapperTest
from op_mapper_test import OpMapperTest, logger
import paddle import paddle
......
...@@ -16,10 +16,8 @@ import logging ...@@ -16,10 +16,8 @@ import logging
import os import os
import struct import struct
import unittest import unittest
from contextlib import contextmanager
import numpy as np import numpy as np
from cinn import Target
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from cinn.runtime import seed as cinn_seed from cinn.runtime import seed as cinn_seed
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
from struct import pack, unpack from struct import pack, unpack
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,14 +14,12 @@ ...@@ -14,14 +14,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest
import paddle import paddle
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -13,10 +13,7 @@ ...@@ -13,10 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from cinn.runtime import * from cinn.runtime import *
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -45,7 +45,7 @@ class TestDivOp(OpTest): ...@@ -45,7 +45,7 @@ class TestDivOp(OpTest):
) )
# paddle.divide does not support zero division # paddle.divide does not support zero division
if self.case["y_dtype"] is "int32" or self.case["y_dtype"] is "int64": if self.case["y_dtype"] == "int32" or self.case["y_dtype"] == "int64":
self.y_np[self.y_np == 0] = 1 self.y_np[self.y_np == 0] = 1
def build_paddle_program(self, target): def build_paddle_program(self, target):
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
...@@ -40,9 +37,9 @@ class TestDropoutInferOp(OpTest): ...@@ -40,9 +37,9 @@ class TestDropoutInferOp(OpTest):
self.x_np = self.random( self.x_np = self.random(
shape=self.case["x_shape"], dtype=self.case["x_dtype"] shape=self.case["x_shape"], dtype=self.case["x_dtype"]
) )
if self.case["mode"] is 'upscale_in_train': if self.case["mode"] == 'upscale_in_train':
self.case["cinn_mode"] = 'upscale_in_train' self.case["cinn_mode"] = 'upscale_in_train'
elif self.case["mode"] is 'downscale_in_infer': elif self.case["mode"] == 'downscale_in_infer':
self.case["cinn_mode"] = 'downgrade_in_infer' self.case["cinn_mode"] = 'downgrade_in_infer'
else: else:
raise f"Unknown mode for dropout_infer: {self.case['mode']}" raise f"Unknown mode for dropout_infer: {self.case['mode']}"
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,17 +14,13 @@ ...@@ -14,17 +14,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
from op_test_helper import TestCaseHelper from op_test_helper import TestCaseHelper
import paddle import paddle
import paddle.nn.functional as F
@OpTestTool.skip_if( @OpTestTool.skip_if(
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -19,7 +19,6 @@ import os ...@@ -19,7 +19,6 @@ import os
import unittest import unittest
from itertools import product from itertools import product
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
import logging import logging
import os import os
import unittest
from itertools import product
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest from op_test import OpTest
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,17 +14,13 @@ ...@@ -14,17 +14,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
from op_test_helper import TestCaseHelper from op_test_helper import TestCaseHelper
import paddle import paddle
import paddle.nn.functional as F
@OpTestTool.skip_if( @OpTestTool.skip_if(
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from random import seed
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,13 +12,11 @@ ...@@ -12,13 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest
from op_test_helper import TestCaseHelper from op_test_helper import TestCaseHelper
import paddle import paddle
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,16 +14,9 @@ ...@@ -14,16 +14,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool
import paddle
from paddle.vision.transforms import functional as F
# paddle resize is based on cv2 module # paddle resize is based on cv2 module
# This test requires cv2 module (pip3.6 install opencv_python==3.2.0.7) # This test requires cv2 module (pip3.6 install opencv_python==3.2.0.7)
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import unittest
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import cinn
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
from op_test import OpTest, OpTestTool from op_test import OpTest, OpTestTool
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn.common import * from cinn.common import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -16,12 +16,7 @@ import logging ...@@ -16,12 +16,7 @@ import logging
import os import os
from test.cinn.ops.op_test import OpTest from test.cinn.ops.op_test import OpTest
from cinn.frontend import ( from cinn.frontend import NetBuilder, Variable
NetBuilder,
Variable,
get_default_graph_pass,
get_default_program_pass,
)
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO').upper()) logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO').upper())
logger = logging.getLogger(name="pass_test") logger = logging.getLogger(name="pass_test")
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
import unittest import unittest
import cinn
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
import sys import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -17,14 +17,11 @@ ...@@ -17,14 +17,11 @@
import sys import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
assert len(sys.argv) == 1 + 2 + 1 # model and enable_gpu count assert len(sys.argv) == 1 + 2 + 1 # model and enable_gpu count
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
import unittest import unittest
import cinn
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.ir import * from cinn.ir import *
from cinn.optim import * from cinn.optim import *
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
import sys import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
import sys import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
...@@ -314,7 +312,7 @@ __global__ void fn_conv2d_0_kernel(float* __restrict__ placeholder, float* __res ...@@ -314,7 +312,7 @@ __global__ void fn_conv2d_0_kernel(float* __restrict__ placeholder, float* __res
"TESTING [mul and add] time cost with shape [128,512]*[256,512]...", "TESTING [mul and add] time cost with shape [128,512]*[256,512]...",
) )
def atest_matmul(self): def atest_matmul3(self):
prog = Program() prog = Program()
a = Variable("A").set_type(Float(32)).set_shape([512, 512]) a = Variable("A").set_type(Float(32)).set_shape([512, 512])
b = Variable("B").set_type(Float(32)).set_shape([512, 512]) b = Variable("B").set_type(Float(32)).set_shape([512, 512])
...@@ -440,7 +438,7 @@ typedef char int8_t; ...@@ -440,7 +438,7 @@ typedef char int8_t;
(tensor_data[0] + tensor_data[1]).reshape(-1), result, atol=1e-4 (tensor_data[0] + tensor_data[1]).reshape(-1), result, atol=1e-4
) )
def atest_elementwise2(self): def atest_elementwise3(self):
prog = Program() prog = Program()
a = Variable("A").set_type(Float(32)).set_shape([4, 1024]) a = Variable("A").set_type(Float(32)).set_shape([4, 1024])
b = Variable("B").set_type(Float(32)).set_shape([4, 1024]) b = Variable("B").set_type(Float(32)).set_shape([4, 1024])
......
...@@ -14,14 +14,9 @@ ...@@ -14,14 +14,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging
import math
import unittest import unittest
import cinn from cinn import framework
import numpy as np
from cinn import common, framework, frontend, ir, lang, runtime
from cinn.poly import create_stages
from test_utils import SingleOpTester from test_utils import SingleOpTester
......
...@@ -14,20 +14,15 @@ ...@@ -14,20 +14,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging
import math import math
import unittest import unittest
import cinn
import conv2d_utils import conv2d_utils
import numpy as np import numpy as np
import pool_utils import pool_utils
from cinn import common, framework, frontend, ir, lang, runtime from cinn import framework
from cinn.poly import create_stages
from test_utils import SingleOpTester from test_utils import SingleOpTester
import paddle
class OpTest_relu(SingleOpTester): class OpTest_relu(SingleOpTester):
def create_target_data(self, inputs_data, attrs): def create_target_data(self, inputs_data, attrs):
......
...@@ -14,15 +14,10 @@ ...@@ -14,15 +14,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging
import math
import os import os
import unittest import unittest
import cinn from cinn import framework
import numpy as np
from cinn import common, framework, frontend, ir, lang, runtime
from cinn.poly import create_stages
from test_utils import SingleOpTester from test_utils import SingleOpTester
import paddle import paddle
......
...@@ -18,8 +18,7 @@ import unittest ...@@ -18,8 +18,7 @@ import unittest
from math import isclose from math import isclose
import cinn import cinn
import numpy as np from cinn import ir
from cinn import CINNValue, ir
class TestPackedFunc(unittest.TestCase): class TestPackedFunc(unittest.TestCase):
......
...@@ -21,15 +21,10 @@ import sys ...@@ -21,15 +21,10 @@ import sys
import unittest import unittest
import numpy as np import numpy as np
from cinn.common import ( from cinn.common import DefaultHostTarget, DefaultNVGPUTarget
DefaultHostTarget,
DefaultNVGPUTarget,
is_compiled_with_cuda,
)
from cinn.frontend import PaddleModelConvertor from cinn.frontend import PaddleModelConvertor
from cinn.runtime import seed as cinn_seed from cinn.runtime import seed as cinn_seed
from op_mappers.op_mapper_test import OpMapperTest from op_mappers.op_mapper_test import OpMapperTest
from ops.op_test import OpTestTool
import paddle import paddle
......
...@@ -22,7 +22,6 @@ import scipy ...@@ -22,7 +22,6 @@ import scipy
from cinn import Target, ir, lang, pe, runtime from cinn import Target, ir, lang, pe, runtime
from cinn.common import * from cinn.common import *
from cinn.poly import create_stages from cinn.poly import create_stages
from scipy import special
class TestPEElementwise(unittest.TestCase): class TestPEElementwise(unittest.TestCase):
......
...@@ -17,14 +17,11 @@ ...@@ -17,14 +17,11 @@
import sys import sys
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -18,14 +18,11 @@ import sys ...@@ -18,14 +18,11 @@ import sys
import time import time
import unittest import unittest
import cinn
import numpy as np import numpy as np
from cinn import Target, ir, lang, runtime
from cinn.common import * from cinn.common import *
from cinn.framework import * from cinn.framework import *
from cinn.frontend import * from cinn.frontend import *
import paddle
from paddle import fluid from paddle import fluid
enable_gpu = sys.argv.pop() enable_gpu = sys.argv.pop()
......
...@@ -15,13 +15,11 @@ ...@@ -15,13 +15,11 @@
# limitations under the License. # limitations under the License.
import logging import logging
import math
import unittest import unittest
import cinn import cinn
import numpy as np import numpy as np
from cinn import common, framework, frontend, ir, lang, runtime from cinn import common, framework, ir, lang, runtime
from cinn.poly import create_stages
class SingleOpTester(unittest.TestCase): class SingleOpTester(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册