Closed
Description
The method copy
of GPUArray
behaves like the strides of the associated object were in C-order. However, if I set the strides explicitly afterwards, everything is fine. For details see the code snippet below.
import pycuda.autoinit
import pycuda.gpuarray as gpuarray
import numpy as np
a = np.arange(4.).reshape(2, 2, order="F")
print a
print a.strides
a_gpu = gpuarray.to_gpu(a)
print a_gpu
print a_gpu.strides
a_gpu_cp = a_gpu.copy()
print a_gpu_cp
print a_gpu_cp.strides
a_gpu_cp.strides = a_gpu.strides
print a_gpu_cp
print a_gpu_cp.strides
Metadata
Metadata
Assignees
Labels
No labels
Activity