The current interface to request asynchronous memory transfers does not seem to garantee that an asynchronous call will not be blocking: i suppose there is a maximum number of pending requests per stream/per device/per context ? If so, is there any way to get access to that maximum number, or to detect that a call will be blocking (for instance by returning EWOULDBLOCK or EAGAIN typically)?
The reason why i’m asking this is that i’m designing a runtime system that schedules both tasks and data transfers, so that it is interesting to perform data prefetch operations, unless those avoid doing computations of course. If i had an idea of the maximum size of the “queue”, i could just issue a certain number of prefetch requests at the same time.
Thanks in advance,