RFC: `xpx.compile` as an abstraction for `torch.compile` and `jax.jit` decorators?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
まず、リンクされている torch.compile と jax.jit のドキュメントを確認し、それらのデコレーターパラメータをここで提案されている array-api-extra の抽象化と比較します。デフォルトのコンパイルと namespace スコープの kwargs が有用かどうかを判断し、合意した API 設計と、サポートされていない namespace に対する no-op 動作を Definition of Done として文書化します。
索引モデルが issue の本文から書いたものです。
説明
Has anybody investigated the possibility to allow for an array agnostic way to leverage the torch.compile and jax.jit decorators in array-api-extra?
This might be useful for array API consuming libraries such as SciPy or scikit-learn. For array API namespaces without JIT compiler support, xpx.compile would just result in a noop decorator. For torch and JAX it might, dispatching to an actual JIT compiler could unlock significant speed-ups and memory usage improvements.
However, the parameters of those decorators have many kwargs with seemingly very little overlap:
- https://docs.jax.dev/en/latest/_autosummary/jax.jit.html
- https://docs.pytorch.org/docs/stable/generated/torch.compile.html
Maybe xpx.compile could be made to accept arbitrary kwargs scoped by the underlying namespace name without attempting to map common compiler semantics together.
@xpx.compile(
torch=dict(options={"triton.cudagraphs": True}, fullgraph=True),
jax=dict(static_argnames=['n']),
)
def some_array_function(array, n):
...
I have little experience to tell whether calling those decorators with their default argument is useful or not in practice.
- 主要言語
- Python
- スター
- 33
- フォーク
- 33
- 平均マージ
- 1時間 33分
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
data-apis/array-api-extra のほかの issue
-
enhancement new function
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
data-apis/array-api-extra#992 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
testing
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
data-apis/array-api-extra#901 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
testing upstream issue
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
data-apis/array-api-extra#900 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked testing xpx.testing
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
data-apis/array-api-extra#833 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
data-apis/array-api-extra#811 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
data-apis/array-api-extra の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
instance instance add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
searxng/searx-instances#941 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
FluidNumerics/fluid-walk-blocker#89 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信