From fe4687b9f6d41eff66742cdde694680538a3d5e4 Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Fri, 10 Dec 2021 22:49:13 +0900 Subject: [PATCH] fixed cmd arguement --- python/tvm/contrib/cutlass/gen_conv2d.py | 14 ++++++-------- python/tvm/contrib/cutlass/gen_tensor_op.py | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/python/tvm/contrib/cutlass/gen_conv2d.py b/python/tvm/contrib/cutlass/gen_conv2d.py index f51d317f904d6..63c5bd31893a2 100644 --- a/python/tvm/contrib/cutlass/gen_conv2d.py +++ b/python/tvm/contrib/cutlass/gen_conv2d.py @@ -157,10 +157,10 @@ def profile( self, d_shape, w_shape, + out_shape, padding, stride, dilation, - out_shape, out_dtype, profile_all=True, use_multiprocessing=False, @@ -188,13 +188,13 @@ def profile( "--k=%d" % OC, "--c=%d" % IC, "--r=%d" % R, - "--s=%d" % IC, + "--s=%d" % S, "--pad_h=%d" % padding[0], - "--pad_w=%d," % padding[1], + "--pad_w=%d" % padding[1], "--stride_h=%d" % stride[0], - "--stride_w=%d" % stride[0], + "--stride_w=%d" % stride[1], "--dilation_h=%d" % dilation[0], - "--dilation_w=%d" % dilation[0], + "--dilation_w=%d" % dilation[1], ] for op in ops: out = self.engine.evaluate(op, args) @@ -224,6 +224,4 @@ def profile( alignment = gemm_profile_result["alignment"] data_type = gemm_profile_result["data_type"] - out = create_conv2d_operator([tile_description], data_type, [alignment])[0] - # print(out["src"]) - return out + return create_conv2d_operator([tile_description], data_type, [alignment])[0] diff --git a/python/tvm/contrib/cutlass/gen_tensor_op.py b/python/tvm/contrib/cutlass/gen_tensor_op.py index 6426ed5b2161d..ec5645bb95c6e 100644 --- a/python/tvm/contrib/cutlass/gen_tensor_op.py +++ b/python/tvm/contrib/cutlass/gen_tensor_op.py @@ -190,7 +190,6 @@ def _compile(self, op): fi.write(op["src"]) fi.close() cmd = self.cmd.format(cflags=self.cflags, src=fi.name, output=opath) - print(cmd) os.system(cmd) os.unlink(fi.name) @@ -213,7 +212,6 @@ def evaluate(self, op, args): for arg in args: cmd.append(str(arg)) try: - print("".join(cmd)) sp = subprocess.run(cmd, capture_output=True, check=True) rt = float(sp.stdout) logger.info("%s, %f", op_name, rt)