Closed zzzDavid closed 2 years ago
I think you need to add some interface like MemRefElementTypeInterface
that enables the FixedTypes to be passed in memref
.
Constant global memref for fixed-point type is supported in #33, therefore, closing this issue.
In MLIR code we can have constant global memrefs to store input data for testing purpose. For example, in
mm.mlir
testing example: https://github.com/cornell-zhang/hcl-dialect-prototype/blob/main/test/Translation/mm.mlir, we usememref.global
to store input data, which is fed to the kernel function during globalWe have defined our fixed and ufixed types, they work with memref and our custom fixed-point arithmetic operations. However, it doesn't work when I try to initialize a global memref with values:
The error message is:
This is not necessarily an issue, as we can use integer memrefs to test the kernel function. I'm just curious what we need to add in order to make this kind of global memref work with custom types.