Skip to content

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

@hecmay

Description

@hecmay

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'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions