dpnp icon indicating copy to clipboard operation
dpnp copied to clipboard

DPNP vs Numpy strides mismatch

Open abagusetty opened this issue 2 months ago • 0 comments

This one bite us dearly on PVCs, when porting an application written in cupy. Also found a similar issue https://github.com/IntelPython/dpnp/issues/1649

Looks like dpnp considers elements vs bytes (from numpy). Hoping to get some traction on this one

import dpnp as dp
import numpy as np

shape = (4, 24, 4096)
a_dp, a_np = dp.empty(shape, order='C'), np.empty(shape, order='C')

print("dpnp strides:", a_dp.strides)
print("numpy strides:", a_np.strides)
print("Match:", a_dp.strides == a_np.strides)

abagusetty avatar Oct 27 '25 21:10 abagusetty