JuliaGPU / JuliaGPU/GPUArrays.jl

copyto! does not support CPU SubArrays

Open
#422 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
450
Forks
104
Avg merge
1d 4h
Merged PRs (30d)
10

Description

**Describe the bug**
Copyto! does not work for subarray when scalar get index is disallowed.

**To Reproduce**
The Minimal Working Example (MWE) for this bug:
```julia
using CuArrays
CuArrays.allowscalar(false)
N = 100
u_c = rand(N, 2);
u_d = CuArrays.CuArray(ones(N));
u_v = view(u_c, :, 1);
copyto!(u_d, u_v) #works
copyto!(u_v, u_d) #does not work
```

**Environment details (please complete this section)**
Details on Julia:
```
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)

Status `~/.julia/environments/v1.1/Project.toml`
[3a865a2d] CuArrays v1.2.1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.