CompatibilityList

Daftar Kompatibilitas kelas publik

Data Daftar Kompatibilitas Delegasi GPU.

Delegasi GPU tidak didukung di semua perangkat Android, karena perbedaan versi OpenGL yang tersedia, fitur driver, dan sumber daya perangkat. Kelas ini memberikan informasi apakah delegasi GPU cocok untuk perangkat saat ini.

API ini bersifat eksperimental dan dapat berubah.

PERINGATAN: Daftar Kompatibilitas dibuat dari pengujian yang dilakukan pada sekumpulan model terbatas. Anda harus merencanakan untuk memverifikasi bahwa model Anda berfungsi.

Contoh penggunaan:

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);
 

Konstruktor Publik

Metode Publik

ruang kosong
menutup ()
Membebaskan sumber daya TFLite dalam runtime C.
GPUDelegate.Opsi
dapatkan Opsi Terbaik Untuk Perangkat Ini ()
Opsi apa yang harus digunakan untuk delegasi GPU.
boolean
isDelegateSupportedOnThisDevice ()
Apakah delegasi GPU didukung pada perangkat ini.

Metode Warisan

Konstruktor Publik

Daftar Kompatibilitas publik ()

Metode Publik

penutupan kekosongan publik ()

Membebaskan sumber daya TFLite dalam runtime C.

Pengguna diharapkan memanggil metode ini secara eksplisit.

GpuDelegate.Options publik getBestOptionsForThisDevice ()

Opsi apa yang harus digunakan untuk delegasi GPU.

boolean publik isDelegateSupportedOnThisDevice ()

Apakah delegasi GPU didukung pada perangkat ini.