Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hcl-mlir llvm backend: hcl_dtype_to_mlir returns a mismatching data type #470

Open
hecmay opened this issue Aug 15, 2022 · 1 comment
Open

Comments

@hecmay
Copy link
Collaborator

hecmay commented Aug 15, 2022

this error can be reproduced by running this test case: https://github.com/cornell-zhang/heterocl/blob/hcl-mlir/tests/mlir/hcl-mlir/test_stages.py#L125

Here is the complete error

Traceback (most recent call last):
  File "test_stages.py", line 191, in <module>
    test_outline_cpu()
  File "test_stages.py", line 144, in test_outline_cpu
    mod.modules[0](hcl_A, hcl_B, hcl_C)
  File "/heterocl/python/heterocl/module.py", line 51, in __call__
    argv[i].dtype, signless=True), "Input types: {} {}".format(memref_type.element_type, hcl_dtype_to_mlir(argv[i].dtype, signless=True))
AssertionError: Input types: i32 i32

I printed out these two types:

memref_type.element_type: <class 'hcl_mlir._mlir_libs._mlir.ir.Type'>
hcl_dtype_to_mlir(argv[i].dtype, signless=True)): <class 'hcl_mlir._mlir_libs._mlir.ir.IntegerType'>
@hecmay
Copy link
Collaborator Author

hecmay commented Aug 15, 2022

We should probably introduce a HCLType.is_equal(...) function somewhere instead of using the ==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant