MlirPassthroughOp

パブリック最終クラスMlirPassthroughOp

main() 関数を使用してモジュールとして表現された任意の MLIR 計算をラップします。

この操作には関連付けられたカーネルがなく、通常の TensorFlow セッションで実行することを目的としていません。代わりに、これはテスト、またはユーザーがカスタム MLIR 計算を下流で処理するカスタム ツールを使用する目的で TensorFlow グラフを介してカスタム MLIR 計算を渡すことを意図している特別な場合 (たとえば、TensorFlow lite などの異なる環境をターゲットとする場合) に使用することを目的としています。 MLIR モジュールには、エントリ ポイントとして使用される main() 関数が含まれることが期待されます。操作への入力は引数として main() 関数に渡され、main 関数の戻り値は出力にマップされます。使用例:

{@code
 import tensorflow as tf
 from tensorflow.compiler.mlir.tensorflow.gen_mlir_passthrough_op import mlir_passthrough_op
 
 mlir_module = '''python
 func @main(%arg0 : tensor<10xf32>, %arg1 : tensor<10xf32>) -> tensor<10x10xf32> {
    %add = "magic.op"(%arg0, %arg1) : (tensor<10xf32>, tensor<10xf32>) -> tensor<10x10xf32>
    return %ret : tensor<10x10xf32>
 }
 '''

パブリックメソッド

静的MlirPassthroughOp
create (スコープscope、Iterable< Operand <?>>入力、String mlirModule、List<Class<?>> Toutputs)
新しい MlirPassthroughOp 操作をラップするクラスを作成するためのファクトリ メソッド。
イテレータ<オペランド<オブジェクト>>
リスト<出力<?>>

継承されたメソッド

パブリックメソッド

public static MlirPassthroughOp create (スコープscope、Iterable< Operand <?>> inputs、String mlirModule、List<Class<?>> Toutputs)

新しい MlirPassthroughOp 操作をラップするクラスを作成するためのファクトリ メソッド。

パラメーター
範囲現在のスコープ
戻り値
  • MlirPassthroughOp の新しいインスタンス

public Iterator<オペランド<オブジェクト>> iterator ()

public List<出力<?>>出力()