JuliaGPU / JuliaGPU/GPUArrays.jl

mean fails with views

Open
#478 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
450
Forks
104
Avg merge
1d 4h
Merged PRs (30d)
10

Description

```
A = gpu(rand(3, 5, 2))
mean(@views A[1, :, :]; dims=2)
# ERROR: Scalar indexing is disallowed.
```

However, the following all work:

```
sum(@views A[1, :, :]; dims=2)
mean(A[1, :, :]; dims=2)
sum(A[1, :, :]; dims=2)
```

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.