Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#676 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Julia
Estrellas
234
Forks
77
Merge medio
1 d 5 h
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SciML/RecursiveArrayTools.jl

Todos los issues de SciML/RecursiveArrayTools.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.