Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/analogdevicesinc/codefusion-studio/llms.txt

Use this file to discover all available pages before exploring further.

Before generating inference code or deploying a model to hardware, the CodeFusion Studio Compatibility Analyzer checks whether your model is actually supported by the selected processor. It evaluates three distinct categories — memory constraints, operator support, and data type compatibility — and reports every issue with a severity level and actionable remediation guidance. Addressing compatibility issues at this stage prevents build errors and runtime failures downstream.
The Compatibility Analyzer currently supports TFLM (TensorFlow Lite Micro) models only. CNN accelerator models on the MAX78002, which use PyTorch with the izer backend, are not supported by the analyzer. The compatibility report options are disabled in the System Planner UI when an izer model is selected.

What the Compatibility Analyzer checks

The analyzer validates three categories of requirements against the hardware profile of the selected SoC and core:

Memory constraints

Compares the model’s flash and RAM requirements to the hardware limits defined in the target profile. Reports overflow conditions for model storage (flash and/or RAM) and peak runtime RAM usage.

Operator support

Checks that every operator used in the model graph is implemented by the target runtime. Unsupported operators are listed with their layer indices and, where available, a suggested hardware-compatible alternative.

Data type compatibility

Verifies that all operator–data-type combinations in the model are supported by the target. For example, FLOAT32 is flagged on processors that require quantized (INT8 or UINT8) models.

Run the analyzer from System Planner

1

Open Embedded AI Tools

In your workspace, open System Planner and click the Embedded AI Tools tab.
2

Add or select a model

If your workspace does not already have a model configured, click Add Model and complete the model configuration. See Embedded AI Tools for details.
3

Open the Compatibility Report

If the analyzer detects compatibility issues, the Open Compatibility Report button appears next to the model entry. Click it to open the interactive graphical report.
The Open Compatibility Report button only appears when compatibility issues are detected for a model.
4

Review and act on issues

The report displays expandable sections for each issue category, severity indicators, and clickable reference links to TensorFlow optimization guides. Address each flagged issue, then regenerate the report to confirm resolution.
To reopen a previously generated report, select AI Tools > Open Report from the CFS Home Page.

Run the analyzer from the CLI

Use cfsutil ai compat to check compatibility from the terminal. At minimum, provide --model, --soc, and --core.
cfsutil ai compat --soc <soc> --core <core> --model <path/to/model_file>

Flags

FlagShortDescription
--model-mPath or URL to the model file.
--soc-sTarget SoC (e.g. MAX32690, MAX32657, ADSP-SC835).
--core-cTarget core (e.g. CM4, CM33, FX).
--acc-aTarget accelerator (optional).
--package-pSoC package variant (optional, e.g. WLP, TQFN).
--dataset-dPath or URL to a dataset file for analysis.
--formatConsole output format: text (default) or json.
--report-filePath to write a JSON report file.
--search-path-xAdditional search path for data models. Can be repeated.
--ignore-cacheBypass cache and fetch the latest remote files.

Example commands

# Basic compatibility check for MAX32690 Cortex-M4
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite

# Check a specific SoC package variant
cfsutil ai compat --soc MAX32690 --core CM4 --package WLP --model model.tflite

# Output console results as JSON (useful for CI parsing)
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite --format json

# Write a machine-readable JSON report to a file
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite \
    --report-file compat-report.cfsreport

# Check compatibility for SHARC-FX on ADSP-SC835
cfsutil ai compat --soc ADSP-SC835 --core FX --model model.tflite
When the model is fully compatible, the output confirms readiness:
Model fully compatible with target hardware platform
No compatibility issues detected - ready for deployment

Understanding the compatibility report

The report output is organized into three sections. Each issue includes a severity, an identifier, and recommended mitigations.
Memory issues are reported when the model exceeds flash or RAM limits on the target hardware. They do not block code generation in CFS, but a model that fails memory constraints is unlikely to run correctly on the hardware.Output format:
[SEVERITY] ISSUE_IDENTIFIER – MEMORY_SCOPE
Issue identifiers:
IssueSeverityMeaning
model_storage_memory_overflow – flash_and_ramCRITICALModel exceeds both flash and RAM
model_storage_flash_overflow – flashWARNINGExceeds flash, but fits in RAM
model_storage_ram_overflow – ramWARNINGExceeds RAM, but fits in flash
ram_memory_overflow – ramWARNINGPeak runtime RAM usage exceeds limit
Example output:
Memory Constraint Issues (1):
Memory requirements exceed hardware limitations
[CRITICAL] model_storage_memory_overflow - flash_and_ram memory
Recommended mitigations:
  • INT8 quantization — Convert the model to 8-bit integer precision using the TensorFlow Lite post-training quantization guide.
  • Weight pruning — Remove unnecessary weights or neurons. See the TensorFlow Model Optimization documentation.
  • Model architecture optimization — Replace standard convolutions with depthwise separable convolutions or other hardware-efficient layers.
  • Reduce model complexity — Simplify the model by reducing layer count or dimensions.
  • For runtime RAM overflow — Lower batch size, enable layer fusion, or optimize tensor lifecycle to reduce peak memory.

JSON output for CI integration

Use --format json for machine-readable console output, or --report-file to write a structured JSON report to disk. Both options are suitable for CI/CD pipelines and scripting.
# JSON console output
cfsutil ai compat --soc MAX32690 --core CM4 --model model.tflite --format json

# JSON report file for programmatic analysis
cfsutil ai compat \
    --soc MAX32690 \
    --core CM4 \
    --model model.tflite \
    --report-file reports/compat-max32690-cm4.cfsreport
The compatibility analyzer logic is located in analyze_compatibility.py in the cfs-ai/packages directory of the CodeFusion Studio repository. This script can be adapted or extended for custom use cases.

Supported model formats per processor

Refer to the table below when deciding which format to use for your target. Only TFLM models (.tflite) are currently supported by the Compatibility Analyzer.
ProcessorSupported AI ModelsSupported Cores
MAX32657TFLMArm Cortex-M33
MAX32690TFLMArm Cortex-M4
MAX78002PyTorch (CNN only), TFLM (M4 only)Arm Cortex-M4 + CNN Accelerator
ADSP-21834 / 21834WTFLMSHARC-FX
ADSP-21835 / 21835WTFLMSHARC-FX
ADSP-21836 / 21836WTFLMSHARC-FX
ADSP-21837 / 21837WTFLMSHARC-FX
ADSP-SC834 / SC834WTFLMSHARC-FX + Arm Cortex-M33
ADSP-SC835 / SC835WTFLMSHARC-FX + Arm Cortex-M33

Next steps

Profile Resource Usage

After confirming compatibility, profile memory, latency, and per-layer performance before deployment.

Generate Inference Code

Build deployable C/C++ source files for your model using cfsutil ai build or System Planner.

Build docs developers (and LLMs) love