mace-cl-compiled-program.bin is a binary file associated with Qualcomm's MACE (Multimedia Acceleration Environment) , specifically tied to the Computer Vision (CV) and Neural Processing (NP) pipelines on Snapdragon SoCs (System on Chips). The "CL" in the name strongly indicates OpenCL (Open Computing Language) compilation.
This file is not a standard Linux ELF executable; rather, it is a device-specific, compiled kernel blob intended for execution on Qualcomm’s Hexagon DSP or Adreno GPU via OpenCL.
The file is not portable. It contains GPU-specific instructions (e.g., Adreno 640 vs Mali-G76). Load it on a different GPU model, and it will crash or fail to load. That's why MACE typically stores multiple compiled binaries for different target devices.
#include "mace/public/mace.h"// Initialize MACE engine mace::MaceStatus status; mace::MaceEngineConfig config(mace::DeviceType::MYRIAD); std::shared_ptr<mace::MaceEngine> engine;
// Load pre-compiled binary std::vector<unsigned char> compiled_program; // ... read mace-cl-compiled-program.bin into vector
// Create engine with compiled binary status = mace::CreateMaceEngineFromCompiledProgram( "my_model", compiled_program, config, &engine );
// Run inference std::map<std::string, mace::MaceTensor> inputs, outputs; // ... fill inputs engine->Run(inputs, &outputs);
| Goal | Approach |
|------|----------|
| Use it for inference | Place it in the MACE model directory with the correct .pb or .mace model file. Load with mace::MaceEngine passing GPU device type. |
| Inspect device compatibility | Use CL_DEVICE_NAME via OpenCL to get your device name, then check if it matches the binary’s target. |
| Disassemble (advanced) | The binary is usually vendor-specific (e.g., Qualcomm’s Adreno CL binary format). Tools like qcom-cl-compiler or Mali offline compiler might read it, but rarely publicly documented. |
| Delete safely | If you’re cleaning storage and don’t run MACE-based AI apps, deletion is safe. The app will recompile the OpenCL kernel if needed (at a performance cost). |