Replies: 3 comments
-
Forked repository and added code |
Beta Was this translation helpful? Give feedback.
-
@tmao8 Can you add an update here? I think it is also good to create a PR after you have some test cases. For simple testing, you can just turn the MLIR module into a string and then directly compare the string. |
Beta Was this translation helpful? Give feedback.
-
Created an optional parameter to ASTTransformer callable for file name (the file the function is from). Using this parameter, the ASTBuilder will set a global variable file_name, and every time the ASTBuilder is called it will have the file name stored. Each node can then transform with location specified by the node's lineno and col offset. The MLIR now has line numbers from the original python frontend if printed using s.module.operation.print() and specifying enable_debug_info=True and use_local_scope=True |
Beta Was this translation helpful? Give feedback.
-
The existing Allo IR builder does not include the Python source code line number in the IR, which makes it hard to trace back to the original function from MLIR to Python and debug. Therefore, we want to include this information in the IR by explicitly setting the
Location
field for each operation. See the customize function.Reference:
Beta Was this translation helpful? Give feedback.
All reactions