Xilinx / mlir-air

MIT License
74 stars 26 forks source link

Add Python Programming Example #590

Closed hunhoffe closed 3 months ago

hunhoffe commented 3 months ago

Add a python programming example that is checked end-to-end by the CI workflow. This example includes multiple workflows for how to run the code (defined using AIR python bindings) on an NPU.

To support some of the additional passes used in test/xrt (including those for dependencies), I added a new argument, --experimental, to aircc.py, which will run those additional passes. It works on my example but I suspect that this will need to be changed/updated as more examples are made but I believe what I have is a reasonable starting point.

To simplify the example, I also added a wrapper around the python dma_memcpy_nd function to supply default values and allow the caller to use python integers.

jgmelber commented 3 months ago

@fifield is the --experimental argument okay with you?

fifield commented 3 months ago

@fifield is the --experimental argument okay with you?

Yup. However I would like it to become not experimental and have the pass pipeline work with all the examples and tests.