Data CompatibilityListing Delegasi GPU.
Delegasi GPU tidak didukung di semua perangkat Android karena perbedaan dalam versi OpenGL, fitur driver, dan resource perangkat yang tersedia. Class ini memberikan informasi tentang apakah delegasi GPU cocok untuk perangkat saat ini.
API ini bersifat eksperimental dan dapat berubah sewaktu-waktu.
PERINGATAN: compatibilityList dibuat dari pengujian yang dilakukan pada sekumpulan model terbatas. Anda harus berencana untuk memverifikasi bahwa model Anda sendiri 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
void |
close()
Membebaskan resource TFLite di runtime C.
|
GpuDelegate.Options |
getBestOptionsForThisDevice()
Opsi yang harus digunakan untuk delegasi GPU.
|
boolean |
isDelegateSupportedOnThisDevice()
Apakah delegasi GPU didukung di perangkat ini.
|
Metode Turunan
Konstruktor Publik
publik CompatibilityList ()
Metode Publik
public void close ()
Membebaskan resource TFLite di runtime C.
Pengguna diharapkan memanggil metode ini secara eksplisit.
public GpuDelegate.Options getBestOptionsForThisDevice ()
Opsi yang harus digunakan untuk delegasi GPU.
publik boolean isDelegateSupportedOnThisDevice ()
Apakah delegasi GPU didukung di perangkat ini.