CompatibilityList

パブリック クラスCompatibilityList

GPU デリゲートの互換性リスト データ。

GPU デリゲートは、利用可能な OpenGL バージョン、ドライバー機能、デバイス リソースの違いにより、すべての Android デバイスでサポートされているわけではありません。このクラスは、GPU デリゲートが現在のデバイスに適しているかどうかに関する情報を提供します。

この API は実験的なものであり、変更される可能性があります。

警告:互換性リストは、限られたモデルのセットで行われたテストに基づいて作成されています。独自のモデルが機能することを検証する計画を立てる必要があります。

使用例:

Interpreter.Options options = new Interpreter.Options();
 try (CompatibilityList compatibilityList = new CompatibilityList()) {
   if (compatibilityList.isDelegateSupportedOnThisDevice()) {
     GpuDelegate.Options delegateOptions = compatibilityList.getBestOptionsForThisDevice();
     gpuDelegate = new GpuDelegate(delegateOptions):
     options.addDelegate(gpuDelegate);
   }
 }
 Interpreter interpreter = new Interpreter(modelBuffer, options);
 

パブリックコンストラクター

パブリックメソッド

空所
近い()
C ランタイムの TFLite リソースを解放します。
GPUDelegate.オプション
getBestOptionsForThisDevice ()
GPU デリゲートに使用する必要があるオプション。
ブール値
isDelegateSupportedOnThisDevice ()
GPU デリゲートがこのデバイスでサポートされているかどうか。

継承されたメソッド

パブリックコンストラクター

public CompatibilityList ()

パブリックメソッド

public void close ()

C ランタイムの TFLite リソースを解放します。

ユーザーはこのメソッドを明示的に呼び出すことが期待されます。

public GpuDelegate.Options getBestOptionsForThisDevice ()

GPU デリゲートに使用する必要があるオプション。

public boolean isDelegateSupportedOnThisDevice ()

GPU デリゲートがこのデバイスでサポートされているかどうか。