You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a couple of question, about what might be useful to include or modify.
What is the purpose of lanes? Lanes seems like a way to describe access of data (i.e. alignment) and not the data itself. But since it affects the shape it is very limiting to use lanes != 1 (none of the Py-libs do or support it, I think)?
Unless lanes don't affect shape/strides, in which case they could convey other information.
How about adding alignment=256 or pow2_alignment=8? An alignment larger than itemsize could indicate that it is valid to do vectorized reads of that size (may require the use of byte_offset if the first reads starts at an offset?).
The current stream exchange allows the consumer to synchronize with the producer at time of consumption. If all the consumer wants to do is a computation like:
@compile_for_dlpack
def update_simulation(dlpack_array):
data = dlpack_array.__dlpack__(stream=s2) # synchronizes with "s2"
# launch work on s2
return # returns without synch of original stream.
# user code:
arr = MyArray()
for i in range(1000):
update_simulation(arr)
do_analysis(arr) # cannot be auto-synch'ed
cannot guarantee do_analysis waits, unless update_simulation does a full synchronization? (Maybe this is just not important?)
Is stream lifetime management difficult? I can see mylib.from_dlpack(arr) synchronizing only once (although it might be nicer to be safer by default, but I don't know). But for the computational library use-case seems more relevant?
(I have read the the thread about introducing the stream= API, but it is not really clear to me why the current scheme is much simpler)
The text was updated successfully, but these errors were encountered:
I have a couple of question, about what might be useful to include or modify.
What is the purpose of
lanes
? Lanes seems like a way to describe access of data (i.e. alignment) and not the data itself. But since it affects the shape it is very limiting to uselanes != 1
(none of the Py-libs do or support it, I think)?Unless lanes don't affect shape/strides, in which case they could convey other information.
How about adding
alignment=256
orpow2_alignment=8
? An alignment larger than itemsize could indicate that it is valid to do vectorized reads of that size (may require the use ofbyte_offset
if the first reads starts at an offset?).The current stream exchange allows the consumer to synchronize with the producer at time of consumption. If all the consumer wants to do is a computation like:
cannot guarantee
do_analysis
waits, unlessupdate_simulation
does a full synchronization? (Maybe this is just not important?)Is stream lifetime management difficult? I can see
mylib.from_dlpack(arr)
synchronizing only once (although it might be nicer to be safer by default, but I don't know). But for the computational library use-case seems more relevant?(I have read the the thread about introducing the
stream=
API, but it is not really clear to me why the current scheme is much simpler)The text was updated successfully, but these errors were encountered: