JuliaArrays / JuliaArrays/ArrayInterface.jl

Bug in `device` for reshaped views

Open
#158 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
140
Forks
44
Avg merge
4d 14h
Merged PRs (30d)
5

Description

Reported by @chriselrod in https://github.com/JuliaArrays/ArrayInterface.jl/pull/156#issuecomment-851293134:

 julia> using ArrayInterface
 
 julia> u_base = randn(10, 10); u_view = view(u_base, 2:3, :); u_reshaped_view = reshape(u_view, 1, length(u_view));
 
 julia> ArrayInterface.device(u_reshaped_view)
 ArrayInterface.CPUPointer()

This u_reshaped_view is not strided, so it should not be a CPUPointer(), but a CPUIndex() (which currently is not supported by LoopVectorization).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Julia example involving ArrayInterface.device on a reshaped view, then inspect how reshaped and strided views are classified. Done means the non-strided reshaped view is identified as CPUIndex rather than CPUPointer.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.