Custom pseudo-operations for generic rewriting
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、添付された cusops2ons.py.txt と test_generic_as_wrap.py.txt を読み、次に Opset、script、Op、op_schema 周辺の onnxscript rewriter の使用方法を調査してください。カスタム擬似演算が汎用リライトに参加できるかどうかを判断し、意図したリライト動作を示すテストを含む、動作するカスタムノードの例を文書化してください。
索引モデルが issue の本文から書いたものです。
説明
This text organized as
- Problem
- Solution
- This issue subject
Problem to solve
I want element-wise operations move above their commutatives (friends). See picture:
I don't want to encode every possible interchange pair, so must be generic element-wise and generic friend. Can I have it with current onnxscript (0.2.2) rewriter?
- Solution
Use meta-abc node pairs like this:
In the attachment, there is prototype implementation.
It moves elementwise operations (ReLU and Tanh) above Identity and Flatten
For now, we encode elementwise wrappers as [Split(axis=20), Sub]
and wrappers of their friend as [Split(axis=30), Sub]
What do you think about this approach to generics?
- The issue
Well, it works! But using Split and Sub as replacement to ABC_pre and ABC_post is obviously bad.
I actually tried to create custom pseudo-operation, but failed.
As I create op like this:
my_opset = Opset("com.mydomain", 15)
@script(my_opset)
def joy_of_relu( x:FLOAT ) -> FLOAT:
y = op.Relu(x)
return op.Relu(y)
opsch = joy_of_relu.op_schema
shiny_new_op = Op(
opset=my_opset, name="relurelu", op_schema=opsch
)
it not work with rewriter, also I tried onnxruntime_extensions.onnx_op
So, if it is possible, it would be great to have example of using rewriter with custom nodes.
- 主要言語
- Python
- スター
- 457
- フォーク
- 149
- 平均マージ
- 3日 20時間
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/onnxscript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/onnxscript#3155 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/onnxscript#3003 · コメント 3 件 ·
メンテナーはふだん 4 日以内に返信
-
CI : Pin github actions to full commit SHA対応中かも @Aniketsy が 184 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/onnxscript#2903 · コメント 6 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoft/onnxscript#3156 ·
メンテナーはふだん 4 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
microsoft/onnxscript#3154 ·
メンテナーはふだん 4 日以内に返信
microsoft/onnxscript の issue をすべて見る
似ている issue
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged in対応中かも @Rarasinhoo が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
pgadmin-org/pgadmin4#10733 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws-samples/sample-per-model-bedrock#752 ·
メンテナーはふだん 1 日以内に返信
-
lesson-submission pending-review
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
Ikalus1988/MisakaNet#4452 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OCHA-DAP/topo-tools#250 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信