Commit 3f25bd1b authored by Wenhao Xie's avatar Wenhao Xie Committed by LeiWang1999
Browse files

[BugFix] Correct argparse for example_convolution test (#474)



* add convolution example to CI

* lint fix

* Update test_example_convolution.py

* fix bug

---------
Co-authored-by: default avatarLei Wang <34334180+LeiWang1999@users.noreply.github.com>
parent abe170a6
...@@ -230,7 +230,7 @@ def convolution(N, ...@@ -230,7 +230,7 @@ def convolution(N,
return main return main
def main(): def main(argv=None):
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--n', type=int, default=128, help='n') parser.add_argument('--n', type=int, default=128, help='n')
parser.add_argument('--c', type=int, default=128, help='c') parser.add_argument('--c', type=int, default=128, help='c')
...@@ -252,7 +252,7 @@ def main(): ...@@ -252,7 +252,7 @@ def main():
default=True, default=True,
help="Whether to enable BitBLAS roller for search space") help="Whether to enable BitBLAS roller for search space")
args = parser.parse_args() args = parser.parse_args(argv)
N, C, H, W, F, K, S, D, P = args.n, args.c, args.h, args.w, args.f, args.k, args.s, args.d, args.p N, C, H, W, F, K, S, D, P = args.n, args.c, args.h, args.w, args.f, args.k, args.s, args.d, args.p
a = torch.randn(N, H, W, C).cuda().half() a = torch.randn(N, H, W, C).cuda().half()
b = torch.randn(K, K, C, F).cuda().half() b = torch.randn(K, K, C, F).cuda().half()
......
...@@ -5,7 +5,7 @@ import example_convolution ...@@ -5,7 +5,7 @@ import example_convolution
@tilelang.testing.requires_cuda @tilelang.testing.requires_cuda
def test_example_convolution(): def test_example_convolution():
example_convolution.main() example_convolution.main([])
if __name__ == "__main__": if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment