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

RFC: `xpx.compile` as an abstraction for `torch.compile` and `jax.jit` decorators?

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python, pytorch

調査の方向性

まず、リンクされている torch.compile と jax.jit のドキュメントを確認し、それらのデコレーターパラメータをここで提案されている array-api-extra の抽象化と比較します。デフォルトのコンパイルと namespace スコープの kwargs が有用かどうかを判断し、合意した API 設計と、サポートされていない namespace に対する no-op 動作を Definition of Done として文書化します。

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

説明

lazy arrays

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:

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 ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

data-apis/array-api-extra のほかの issue

data-apis/array-api-extra の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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