spcl / pymlir

Python interface for MLIR - the Multi-Level Intermediate Representation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Signed and unsigned integers

Berke-Ates opened this issue · comments

MLIR allows for signed integers like si64 or si32 as well as unsigned ones like ui64 or ui32 as seen on their website: MLIR IntegerType. However this simple example:
hw.mlir:

module  {
    func @mlir_entry(%a: si32) -> si32 {
        return %a : si32
    }
}

main.py:

import mlir
ast1 = mlir.parse_path('hw.mlir')

throws an exception: lark.exceptions.UnexpectedCharacters. The same happens if one replaces si with ui. A quick check shows that these keywords carry over to the generic form as well.

Thanks. These types were probably added after I made the lark file.

Fixed in #14, please reopen if interface is not working