I have been trying to write collectives in JSON and running them on hardware. What I have observed that the JSON checker sometimes accepts and implementation, but that implementation is incorrect on hardware.
In some cases, it accepts an implementation that I am sure is not correct.
I think the send_recv_proxy example code can help to illustrate this.
- The example passes the
Check(). However, I believe the wait() statement is incorrect since it waits on the input buffer instead of the scratch buffer that is being signaled:
c.signal(nghr, "scratch", 1, sendtb=0, chan_type=ChannelType.proxy)
.....
c.wait(1-r, Buffer.input, 0, recvtb=0, chan_type=ChannelType.proxy)
If I change the wait statement to:
c.wait(1-r, "scratch", 1, recvtb=0, chan_type=ChannelType.proxy)
Check() passes as well.
Apart from which wait statement is correct, I believe one of them should fail the Check().
In addition, the signal() statement can be completely removed and Check() still passes. This seems to indicate that the dependency between them is not checked.