Xilinx / mlir-air

MIT License
76 stars 26 forks source link

Limit on ChannelGet/ChannelPut operations? #643

Closed hunhoffe closed 2 months ago

hunhoffe commented 3 months ago

I was working on https://github.com/Xilinx/mlir-air/pull/642 (which is not ready to merge) and I started to see some behavior I didn't understand. So I tried to make a minimal example and I likewise have some unexpected behavior.

The example I came up with uses somewhat ridiculous things like tiny 1x1 data tiles to make it really obvious to me what was going on in the output. I found that my example fails for a 32x16 image and even an 8x8 image, but it is successful for a 4x4 image.

My example is here. It's not supposed to pass the python test harness, I've just been looking at the output to see what it's doing.

As usual, you can run with:

make clean && make

When it fails, it seems like no output is received (the output stays the original value of 0xFFFFFFFFs in the test harness). When it succeeds, each value in the output image is increasing by 2, e.g. for the 4x4 image,

0000 0002 0004 0006 
0008 000a 000c 000e 
0010 0012 0014 0016 
0018 001a 001c 001e

Because it only works for small images, I'm guessing I'm running into a limit on the number of channel operations/copies allowed at some point, but I have not yet confirmed this theory.

In submitting this issue I'm hoping to discover:

hunhoffe commented 2 months ago

I don't think this is a great minimal example, so I'm closing it for now until/unless I find similar behavior in a simpler example.