Mace-cl-compiled-program.bin [DIRECT]
Instead of recompiling OpenCL kernels from source code every time an application starts, MACE compiles them once, saves them to this file, and reloads them for subsequent executions. Purpose and Benefits
to device filesystem:
The file is typically found within a mobile application's internal data directory or a temporary storage path designated by the MACE engine. How to build - MACE documentation - Read the Docs mace-cl-compiled-program.bin
Developers may encounter the error "File does not exist" or a "no precompiled OpenCL binary" warning in their logs.
: Create a .yml file that defines your model and specifies the gpu as a runtime. Instead of recompiling OpenCL kernels from source code
: Always direct MACE to save mace-cl-compiled-program.bin within the internal application cache space ( context.getCacheDir() in Android). Never save it to public external storage, where it could be tampered with or accidentally wiped by third-party cleaning tools.
The machine code stored inside mace-cl-compiled-program.bin is hyper-specific to the graphics driver version active during its compilation. If a user installs an OTA (Over-The-Air) Android system update that modifies or patches the GPU vendor driver, the cached instructions may become completely incompatible. : Create a
For example, a MobileNet model optimized for a Xiaomi Mi 6 featuring a Snapdragon 835 processor would generate: mobilenet-v2-gpu_compiled_opencl_kernel.MI6.msm8998.bin Performance Comparison: Cold Start vs. Cached Start
: This file is typically generated during a "tuning" phase where MACE optimizes kernels for specific hardware (like Qualcomm Adreno or ARM Mali GPUs). Once generated, it can be deployed with the model to skip the time-consuming compilation step during app startup. Hardware Compatibility
If "mace-cl-compiled-program.bin" is a firmware for a development board:
Understanding mace-cl-compiled-program.bin in Mobile AI Compute Engine (MACE)