Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

ArrayPartition of GPU arrays: norm, dot, Vector, any scalar-index; no KernelAbstractions.get_backend

Aberta
#676 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 3 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Domínio
backend

Direção de pesquisa

Start by locating ArrayPartition's generic AbstractArray operations and existing partition-wise methods; the issue names no source files or tests. Reproduce the examples with JLArrays and allowscalar(false), then investigate KernelAbstractions.get_backend support and the reported method invalidations. Done means the listed operations avoid scalar indexing and backend lookup works, with invalidation effects considered.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

An ArrayPartition of GPU arrays fails several common operations under allowscalar(false). Broadcast, sum, copyto!, fill! and Tsit5 solves work.

using RecursiveArrayTools, JLArrays, LinearAlgebra
JLArrays.allowscalar(false)
ap = ArrayPartition(JLArray([1.0, 2.0]), JLArray([3.0, 4.0]))
sum(ap)          # works
norm(ap)         # ErrorException: Scalar indexing is disallowed.
dot(ap, ap)      # scalar indexing
Vector(ap)       # scalar indexing
any(isnan, ap)   # scalar indexing (without RecursiveArrayToolsArrayPartitionAnyAll)

These fall back to generic element-by-element AbstractArray iteration. Partition-wise methods would fix this, and they are also much faster on CPU: dot takes 1014 ns elementwise and 70 ns partition-wise on a mixed 5-partition AP. The audit measured 21 invalidations from adding dot/norm methods, so this needs a decision.

Related gap found while fixing https://github.com/SciML/OrdinaryDiffEq.jl/issues/4813: KernelAbstractions.get_backend(ArrayPartition(JLArray(...), ...)) throws "Implement get_backend(::ArrayPartition…)". OrdinaryDiffEq's default discontinuity-bracketing setup for continuous callbacks hits this.

Found in a measurement audit of RecursiveArrayTools.jl master 02c477c (v4.5.3). It reproduces on Julia 1.12.4 and 1.10.12, and the reproducer above was re-run as written before filing.

🤖 Filed by Claude Code (model: claude-opus-5-5[1m]) on behalf of @ChrisRackauckas. The audit was done by a Claude Code Opus 5.5 subagent. Session: https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv

Linguagem predominante
Julia
Estrelas
234
Forks
77
Merge médio
1d 16h
PRs com merge (30d)
11

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de SciML/RecursiveArrayTools.jl

Todas as issues de SciML/RecursiveArrayTools.jl

Issues semelhantes

Mais issues de Julia

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.