Xilinx / mlir-air

MIT License
78 stars 26 forks source link

Channel Broadcast Examples #688

Closed hunhoffe closed 2 months ago

hunhoffe commented 3 months ago

This is part of the effort to write channel examples (https://github.com/Xilinx/mlir-air/issues/648).

In both of these examples, I attempt to broadcast an input a to 3 workers. In single_herd, there is a single herd of size=[1, 3] whereas in multi_herd there are 3 herds each of size=[1, 1]. The workers then add a unique value to each element in the input image and output the new image to a unique per-worker output channel. Both of these examples now work!

To make this work cleanly, I created a Channel class to wrap ChannelOp and set the broadcast_size attribute.