Xilinx / mlir-air

MIT License
81 stars 27 forks source link

AIRToAIE: Switch to `isNPU` method for NPU-specific shim dma allocations #781

Closed erwei-xilinx closed 1 week ago

erwei-xilinx commented 1 week ago

Currently, AIRToAIE pass lowers to two forms of shim dma allocation metadata: (1) airrt.herd_metadata {dma_allocations: ... } form, and (2)NPU (XRT) specific aie.shim_dma_allocation metadata,

The condition switching between the two should be isNPU(), and not necessarily isa<AIE::AIE2TargetModel>().

erwei-xilinx commented 1 week ago

fwiw I intend to simplify this further. Hence #779 as a (very small) start. There is no reason to have two lowering paths in air-to-aie to encode the same metadata. At the very least the npu ops should get generated in the airrt to npu lowering.

Totally agreed that we should unify the shim allocation encoding metadata. Do you see the unified metadata encoding format as using aie.shim_dma_allocation or using airrt.herd_metadata?