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
This is in part enforced by the CNM scatter map shape. The scatter map mandates that the last dimensions of the input have the same shape as the buffer. However since then, CNM scatter has been made bufferizable. If the memref has a custom layout or strides, the elements may not be contiguous anyway.
oowekyala
changed the title
Make sure that input memref to upmem.scatter is legal, that is, all scattered elements must be continuous in memory
Make sure that input memref to upmem.scatter is legal, that is, all scattered elements must be contiguous in memory
Jun 19, 2024
This can currently only be verified at the CNM level. The thing is not the entire input memref is required to be contiguous, only the dimensions that we are transferring (which is the shape of the cnm.buffer). However at the upmem level, the cnm.buffer has disappeared, and the scatter/gather ops are operating on the whole memref with a linear index. We have lost information about which dimensions need to be contiguous, and which don't. We could add an attribute to upmem.gather/scatter to be able to verify that though.
This is in part enforced by the CNM scatter map shape. The scatter map mandates that the last dimensions of the input have the same shape as the buffer. However since then, CNM scatter has been made bufferizable. If the memref has a custom layout or strides, the elements may not be contiguous anyway.
For instance
is this legal?
-> yes, because the stride in the second dimension is 1.
The text was updated successfully, but these errors were encountered: