Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#676 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Julia
スター
234
フォーク
77
平均マージ
1日 5時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SciML/RecursiveArrayTools.jl のほかの issue

SciML/RecursiveArrayTools.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。