Where should shared CTE execution, compact arrays and GPU-resident training live?
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
調査の方向性
Read the linked work in #302, #303, and #305, along with DataFusion issue #267 and einfold issues #156 and #157. The issue asks maintainers to decide where shared CTE execution, compact arrays, and GPU-resident training belong, and what public APIs they need; it does not define an implementation. A useful outcome is an agreed ownership and API plan that respects the stated constraints.
索引モデルが issue の本文から書いたものです。
説明
🌀 Claude: The nanoGPT performance work in #302, #303 and #305 (with einfold#156 and einfold#157) shows that a training step written in SQL can run within 3.76× of PyTorch on Apple's GPU. That is a strong result. This issue is for deciding where each piece of that work should live, so it can land without blurring the layers the projects split between them:
- xarray-sql adapts xarray Datasets to SQL engines: registering them as tables, and turning query results back into Datasets.
- ddx (https://github.com/xqlsystems/ddx) differentiates SQL.
- einfold (https://github.com/xqlsystems/einfold) is a query optimizer that finds array computations in a plan and runs array algorithms for them.
- DataFusion (https://datafusion.apache.org/) plans and runs the SQL. Computing a CTE read twice only once is its job, and it's tracked in #267 and on DataFusion's roadmap.
The pieces, and a proposed home for each
| Piece | In | Proposed home |
|---|---|---|
Prepared gradients, Context(threads=), faster registration |
#301 | xarray-sql: fits as it is |
SharedExecutor: materializes each CTE once, with a SQL parser and a function whitelist |
#302 | DataFusion (#267); until then, an opt-in outside xarray-sql's core |
| MLX kernels for einfold's dense backend | #302 | einfold, or a small package of its own, behind einfold#156's backend interface |
Compact arrays: DenseProgram in einfold, DenseExecutor in xarray-sql |
#303, einfold#157 | einfold, likely in Rust beside its existing kernels, with a public interface |
TrainingSession: device-resident state, compiling the whole step, publishing updates atomically, checkpoints |
#305 | A separate package on public APIs. It is a training framework, outside xarray-sql's scope |
| The nanoGPT Shakespeare recipe, checked against PyTorch step by step | #305 | xarray-sql: as demo 3, on public APIs |
Constraints to keep
- No private imports across repositories. Today, xarray-sql would import
einfold._native, the private names ofeinfold.dense_program(_Tensor,_expr,_Decline, ...) andddxdb._ddxdb.to_sql. Any refactor of those would break xarray-sql. Each piece should depend only on its neighbours' public APIs. - Released dependencies, not forks.
accelerators/*/build.pyclones and installs pinned commits of personal forks of ddx and einfold. Those should become releases once the upstream PRs land. - The demos stay plain, legible SQL. Engine-motivated rewrites (for example, demo 2's
grouped_softmax) should be fixed in the engine rather than in the demo's SQL.
Open questions
- Should einfold own a second plan executor (
DenseProgram), or should compact arrays extend its Rust kernels? (For the einfold maintainers.) - Until DataFusion shares CTEs, is an opt-in
SharedExecutorworth carrying, and where? Demo 4 measured 11–15× from materializing each view, so the cost of waiting is real. - What public interface would
TrainingSessionneed from einfold and ddx to live in its own package?
- 主要言語
- Python
- スター
- 142
- フォーク
- 19
- 平均マージ
- 3日 47分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xqlsystems/xarray-sql のほかの issue
-
dependencies github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
xqlsystems/xarray-sql#295 ·
メンテナーはふだん 3 日以内に返信
-
A big-endian data variable registers, then every query fails: Byte-swapped arrays not supportedオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xqlsystems/xarray-sql#288 ·
メンテナーはふだん 3 日以内に返信
-
documentation ml
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
xqlsystems/xarray-sql#268 ·
メンテナーはふだん 3 日以内に返信
-
enhancement ml
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
xqlsystems/xarray-sql#267 · コメント 4 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
xqlsystems/xarray-sql#243 ·
メンテナーはふだん 3 日以内に返信
xqlsystems/xarray-sql の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws-samples/sample-per-model-bedrock#795 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
Pretalx reports older version to be the latest release than what is actually installed and availableオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
micropython/micropython#19906 ·
メンテナーはふだん 1 日以内に返信