Skip to content

Commit

Permalink
fixed cmd arguement
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Dec 11, 2021
1 parent ab114f5 commit fe4687b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 6 additions & 8 deletions python/tvm/contrib/cutlass/gen_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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]
2 changes: 0 additions & 2 deletions python/tvm/contrib/cutlass/gen_tensor_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit fe4687b

Please sign in to comment.