Mace-cl-compiled-program.bin 2021 Jun 2026
Utilize factories like ConfigKVStorageFactory within MACE to manage cache paths flexibly, ensuring the framework safely handles read/write behaviors across modern Android scoped storage constraints.
So, the next time you spot a mace_run folder or a mysterious .bin file on your phone, you'll know exactly what it is: a small, clever piece of engineering quietly working to make your mobile AI experiences faster.
GitHub - XiaoMi/mace: MACE is a deep learning inference framework optimized for mobile heterogeneous computing platforms. GitHub.
Whether you are seeing or storage bloat issues?
directories of certain apps—you may have stumbled across a cryptic file named mace-cl-compiled-program.bin mace-cl-compiled-program.bin
: These files are generally small (often under a few megabytes) and are safe to delete. However, if you delete them, the system will simply regenerate them the next time the associated AI feature is used, potentially causing a brief lag [2, 5].
MACE can automatically tune GPU parameters for specific System-on-Chips (SoCs). These tuned parameters and kernels are then stored in this .bin file to ensure the best possible performance. Key Characteristics
When deploying custom configurations, developers often see warnings in their terminal output, such as: File /data/local/tmp/mace_run/mace_cl_compiled_program.bin does not exist
The framework compiles the kernels and outputs mace-cl-compiled-program.bin into a designated storage path. GitHub
In the context of the Xiaomi MACE (Mobile AI Compute Engine) framework, mace_cl_compiled_program.bin is a . Function and Purpose
When MACE runs a neural network model on a GPU for the first time, it must compile the model's operations (like convolutions and activations) into machine code that the specific GPU can understand. This compilation process, called JIT (Just-In-Time) compilation, can be time-consuming and varies across different devices. Here's a simplified breakdown of the process:
You cannot read this file directly, but you can inspect its metadata. Using the mace command-line tool (compiled from the Xiaomi GitHub repo), you can run:
The first time you launch an app utilizing MACE, it compiles the open-source OpenCL code specifically for your phone's exact GPU model (e.g., an ARM Mali or Qualcomm Adreno GPU). It then writes this compiled machine code into your local storage as mace-cl-compiled-program.bin . However, if you delete them, the system will
When an app (like a camera, a photo editor, or a translation tool) wants to use AI, it has two choices: send your data to a server (slow and private) or process it on your device (fast and secure). If an app uses the MACE framework
: A pre-trained model (from TensorFlow or Caffe) is converted into MACE format.
Ensure that your app grants correct read/write storage permissions to the directory where MACE is directed to save its files. 3. App Crashes or Distorted Visuals After OS Updates
