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

[CI] Add Convolution example to CI (#473)



* add convolution example to CI

* lint fix

* Update test_example_convolution.py

---------
Co-authored-by: default avatarLei Wang <34334180+LeiWang1999@users.noreply.github.com>
parent c5a989f5
...@@ -230,7 +230,7 @@ def convolution(N, ...@@ -230,7 +230,7 @@ def convolution(N,
return main return main
if __name__ == "__main__": def main():
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')
...@@ -269,3 +269,7 @@ if __name__ == "__main__": ...@@ -269,3 +269,7 @@ if __name__ == "__main__":
out_c = kernel(a, b) out_c = kernel(a, b)
ref_c = ref_program(S, P, D)(a, b) ref_c = ref_program(S, P, D)(a, b)
torch.testing.assert_close(out_c, ref_c, rtol=1e-2, atol=1e-2) torch.testing.assert_close(out_c, ref_c, rtol=1e-2, atol=1e-2)
if __name__ == "__main__":
main()
import tilelang.testing
import example_convolution
@tilelang.testing.requires_cuda
def test_example_convolution():
example_convolution.main()
if __name__ == "__main__":
tilelang.testing.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