Skip to content

empty_like ignores memory-order #66

Open
@untom

Description

@untom

Consider:

x = np.random.normal(size=(3, 5)).astype(np.float64, order="F")
x_gpu = gpuarray.to_gpu(x)
y_gpu = gpuarray.empty_like(x_gpu)
x_gpu.flags.c_contiguous == y_gpu.flags.c_contiguous   # gives "False"

I'm not very familiar with the ArrayFlags mechanism. It seems to me that the problem is that empty_like doesn't set the strides argument of the GPUArray-constructor. But I don't know the repercussions of doing this, so I didn't send a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions