Skip to content

Commit

Permalink
[Fix] Add test case for cornell-zhang#458
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzDavid committed May 3, 2022
1 parent 62efe4f commit cd0affe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/issues/test_issue_458.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import heterocl as hcl

def test():
# generates: assert ((uint32)0 < uint32(A[0]));
# the second uint32 is oddly specified ...
def func(A):
hcl.assert_(A[0] > 0, "")

A = hcl.placeholder((2,), "A", dtype=hcl.UInt(16))
s = hcl.create_schedule([A], func)
m = hcl.build(s, "shls")
print(m)

if __name__ == "__main__":
test()

0 comments on commit cd0affe

Please sign in to comment.