In this PR, the following bugs are fixed. More minor fixes will be added to this PR.
Nested hcl.compute with hcl.return_ generated weird error.
Root cause: Incorrect implementation of the mutator that removes redundant casting
Test case: test_compute_basic.py/test_fcompute_nested and test_compute_basic.py/test_fcompute_nested_imperative
Sefgault when subtracting an Int with UInt.
Root cause: Incorrect simplification logic with subtraction, which causes infinite execution.
Test case: test_dtype.py/test_dtype_cast
In this test, we test through all possible permutations of different data types, including int, uint, fixed, ufixed, and float.
Cannot access the data type of an input tensor during packing
Root cause: The data type is a string, which should be a HeteroCL data type instead
Test case: test_compute_pack_unpack.py/test_pack_dtype_str
In this PR, the following bugs are fixed. More minor fixes will be added to this PR.
Nested
hcl.compute
withhcl.return_
generated weird error. Root cause: Incorrect implementation of the mutator that removes redundant casting Test case:test_compute_basic.py/test_fcompute_nested
andtest_compute_basic.py/test_fcompute_nested_imperative
Sefgault when subtracting an Int with UInt. Root cause: Incorrect simplification logic with subtraction, which causes infinite execution. Test case:
test_dtype.py/test_dtype_cast
In this test, we test through all possible permutations of different data types, includingint
,uint
,fixed
,ufixed
, andfloat
.Cannot access the data type of an input tensor during packing Root cause: The data type is a string, which should be a HeteroCL data type instead Test case:
test_compute_pack_unpack.py/test_pack_dtype_str