未验证 提交 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
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册