The creation and use of the mace_cl_compiled_program.bin file is an automatic process that fits into the broader MACE workflow. To get a clearer picture, let's look at the typical steps for building and running a MACE model.
: The compiled binary instructions are loaded into the GPU's command queues.
MACE compiler automatically fuses kernels during binary generation — no manual tuning required. mace-cl-compiled-program.bin
: Note that this binary is device-specific ; a file generated for a Snapdragon 660 will not work optimally on a different chipset.
Without specific details about the target hardware or the MACE project context, providing a highly tailored guide is challenging. For precise instructions: The creation and use of the mace_cl_compiled_program
The primary benefit of utilizing mace-cl-compiled-program.bin is the elimination of application startup lag. The table below highlights the performance differences during the initial engine configuration stage: Without Cache (Cold Start) With mace-cl-compiled-program.bin (Warm Start) High latency (often 500ms to 2000ms+ ) Minimal latency (typically under 20ms ) CPU/Battery Overhead High spikes due to on-device compilation loops Low overhead from direct storage-to-memory copy Execution Risk Vulnerable to driver compilation bugs Highly stable execution of validated binaries How Developers Generate and Deploy the Cache File
Directly in the root of the internal storage /storage/emulated/0/ if an older or poorly configured app version generated it. Is mace-cl-compiled-program.bin Safe? For precise instructions: The primary benefit of utilizing
// Run inference std::map<std::string, mace::MaceTensor> inputs, outputs; // ... fill inputs engine->Run(inputs, &outputs);
It is often accompanied by other cache files like mace-cl-kernel.bin or mace-cl-compiled-program.bin.pb (a text proto version).