NOTE: The Jupyter Notebook below is included in the Chimera SDK and can be run interactively by running the following CLI command:
$ quadric sdk notebook
From the Jupyter Notebook window in your browser, select the notebook named /quadric/sdk-cli/examples/doc_template/understanding_compile_and_run.ipynb.
Understanding Compile and Run Output Directory Structure
This documentation explains the directory structure created when running the SDK Graph Compiler on a neural network model. This guide covers the output generated by the command:
!sdk graph compile --ocm-size 4MB ../common/quant_onnx/resnet18_opt_asym_int8_q.onnx --run
2026-06-19 03:53 - INFO - epu - chimera_job - START==================================onnx_ingest
2026-06-19 03:53 - INFO - epu - codegen - START===============================optimize_relay
2026-06-19 03:53 - INFO - epu - codegen - START====================quantize_to_cpu_runnable_fx
2026-06-19 03:53 - INFO - epu - fx -
Source name Op Output 0 Range Output 0 Frac Bits
----------------------- ---------------------- --------------------------------------- --------------------
output_DequantizeLinear contrib.epu.dequantize (-9.670584946870804, 28.26786369085312) 26
2026-06-19 03:53 - INFO - epu - codegen - START====================build_cpu_runnable_fx_relay
2026-06-19 03:53 - INFO - epu - codegen - START=======================quantize_to_chimera_fx
2026-06-19 03:53 - INFO - epu - codegen - START=================================relay_to_tir
2026-06-19 03:53 - INFO - epu - codegen - START===========================relay_to_epu_relay
2026-06-19 03:53 - INFO - epu - codegen - START==============================adapt_and_order
2026-06-19 03:53 - INFO - epu - mac_counter -
2026-06-19 03:53 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:53 - INFO - epu - mac_counter - MAC Operation Count Summary
2026-06-19 03:53 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 236,027,904 ops (118,013,952 MACs) - /conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer1/layer1.0/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer1/layer1.0/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer1/layer1.1/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer1/layer1.1/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 115,605,504 ops (57,802,752 MACs) - /layer2/layer2.0/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer2/layer2.0/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 12,845,056 ops (6,422,528 MACs) - /layer2/layer2.0/downsample/downsample.0/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer2/layer2.1/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer2/layer2.1/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 115,605,504 ops (57,802,752 MACs) - /layer3/layer3.0/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer3/layer3.0/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 12,845,056 ops (6,422,528 MACs) - /layer3/layer3.0/downsample/downsample.0/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer3/layer3.1/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer3/layer3.1/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 115,605,504 ops (57,802,752 MACs) - /layer4/layer4.0/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer4/layer4.0/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 12,845,056 ops (6,422,528 MACs) - /layer4/layer4.0/downsample/downsample.0/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer4/layer4.1/conv1/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - conv2d: 231,211,008 ops (115,605,504 MACs) - /layer4/layer4.1/conv2/Conv_quant
2026-06-19 03:53 - INFO - epu - mac_counter - ------------------------------------------------------------
2026-06-19 03:53 - INFO - epu - mac_counter - Total: 3,627,122,688 ops (1,813,561,344 MACs)
2026-06-19 03:53 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:53 - INFO - epu - mac_counter -
2026-06-19 03:53 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:53 - INFO - epu - codegen - START=============================plan_lrm_virtual
2026-06-19 03:53 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:53 - INFO - epu - codegen - START===============================lrm_alloc_loop
2026-06-19 03:53 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:53 - INFO - epu - codegen - START================================lrm_splitting
2026-06-19 03:54 - INFO - epu - codegen - START==============================ext_split_relay
2026-06-19 03:54 - INFO - epu - codegen - START====================================build_tir
2026-06-19 03:55 - INFO - epu - chimera_job - Compilation of resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1 successful
╒═════════════════════╤════════════════════════════════════════════════════════════════════════╕
│ Module Name │ resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ONNX File │ ../common/quant_onnx/resnet18_opt_asym_int8_q.onnx │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Product Target │ QC-U │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Number of Cores │ 1 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ISS Clock Frequency │ 1.700 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ L2M Size │ 4MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ LRM Size │ 4kB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ External Read BW │ 128GBps │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ External Write BW │ 128GBps │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ MACS per PE │ 16 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max L2M │ 3.571MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max LRM │ 2.375kB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max Temp Ext Bytes │ 0.000MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Network GMACs │ 1.814 │
╘═════════════════════╧════════════════════════════════════════════════════════════════════════╛
╒════╤════════╤════════╤══════════════════╤══════════════════════════╤═══════╕
│ │ Type │ Name │ shape │ type │ mse │
╞════╪════════╪════════╪══════════════════╪══════════════════════════╪═══════╡
│ 0 │ Input │ input │ [1, 3, 224, 224] │ tensor[FixedPoint32<27>] │ n/a │
├────┼────────┼────────┼──────────────────┼──────────────────────────┼───────┤
│ 1 │ Output │ output │ [1, 1000] │ tensor[FixedPoint32<26>] │ n/a │
╘════╧════════╧════════╧══════════════════╧══════════════════════════╧═══════╛
2026-06-19 03:55 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x7664e6491a20>
FILM 12/12: 100%|███████████████████████████████████████████████████| 12/12 [00:24<00:00, 2.03s/it]
2026-06-19 03:55 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x7664e6491a20>
2026-06-19 03:55 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-06-19 03:55 - INFO - epu - iss_testing - Done 0:00:00.169682
2026-06-19 03:55 - INFO - epu - chimera_job - Combined plots generated and saved to:
/quadric/sdk-cli/examples/doc_template/ccl_build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260619_035509_9056e0/data/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1.combined.png
╒═════════════════════╤════════════════════════════════════════════════════════════════════════╕
│ Module Name │ resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ONNX File │ ../common/quant_onnx/resnet18_opt_asym_int8_q.onnx │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Product Target │ QC-U │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Number of Cores │ 1 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ ISS Clock Frequency │ 1.700 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ L2M Size │ 4MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ LRM Size │ 4kB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ External Read BW │ 128GBps │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ External Write BW │ 128GBps │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ MACS per PE │ 16 │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max L2M │ 3.571MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max LRM │ 2.375kB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Max Temp Ext Bytes │ 0.000MB │
├─────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Network GMACs │ 1.814 │
╘═════════════════════╧════════════════════════════════════════════════════════════════════════╛
╒════╤════════╤════════╤══════════════════╤══════════════════════════╤═══════╕
│ │ Type │ Name │ shape │ type │ mse │
╞════╪════════╪════════╪══════════════════╪══════════════════════════╪═══════╡
│ 0 │ Input │ input │ [1, 3, 224, 224] │ tensor[FixedPoint32<27>] │ n/a │
├────┼────────┼────────┼──────────────────┼──────────────────────────┼───────┤
│ 1 │ Output │ output │ [1, 1000] │ tensor[FixedPoint32<26>] │ 0.075 │
╘════╧════════╧════════╧══════════════════╧══════════════════════════╧═══════╛
Post-ISS Report 1.7 GHz ***
Fully placed-and-routed gate simulation:
╒══════════════════════════════════╤═════════╕
│ Latency (ms) │ 0.31 │
├──────────────────────────────────┼─────────┤
│ FPS │ 3209.81 │
├──────────────────────────────────┼─────────┤
│ Average Power @ 3nm SSGNP (mW) │ 1617.24 │
├──────────────────────────────────┼─────────┤
│ FPS per Watt @ 3nm SSGNP (FPS/W) │ 1984.74 │
├──────────────────────────────────┼─────────┤
│ Ext Rd Bytes (MB) │ 11.83 │
├──────────────────────────────────┼─────────┤
│ Ext Wr Bytes (MB) │ 0.00 │
├──────────────────────────────────┼─────────┤
│ Avg Ext Rd BW (GBps) │ 37.07 │
├──────────────────────────────────┼─────────┤
│ Avg Ext Wr BW (GBps) │ 0.01 │
├──────────────────────────────────┼─────────┤
│ MAC Utilization │ 20.91% │
╘══════════════════════════════════╧═════════╛
*** Data generated using 7nm SSGNP gatesim and scaled to 3nm
[32m[SDK-CLI] : TotalCycles: 529,627[0m
[32m[SDK-CLI] : Executions/second: 3,209.81
[0m
[0mcompute : [0m[96m▇▇▇▇▇▇▇▇▇▇▇▇[0m 66.698K
data_array : [0m[96m▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇[0m 81.084K
mac : [0m[96m▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇[0m 258.386K
data_external: [0m[96m▇▇▇▇▇▇▇[0m 40.751K
data_ocm : [0m[96m▇▇▇▇▇▇▇▇▇▇▇[0m 61.265K
for more information check run directory: /quadric/sdk-cli/examples/doc_template/ccl_build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260619_035509_9056e0
[0m
!tree ccl_build/ -I "CMakeFiles"
[01;34mccl_build/[0m
└── [01;34mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1[0m
├── [00mCMakeLists.txt[0m
├── [00mattention_stubs.hpp[0m
├── [01;34mattention_visuals[0m
│ ├── [00mepu_column_width_pattern.svg[0m
│ ├── [00mepu_row_height_pattern.svg[0m
│ └── [00mepu_tile_block_pattern.svg[0m
├── [01;34mbuild[0m
│ ├── [00mCMakeCache.txt[0m
│ ├── [00mMakefile[0m
│ ├── [00mcmake_install.cmake[0m
│ ├── [00mcommand_log.txt[0m
│ ├── [00mcompile_commands.json[0m
│ ├── [00mcompile_profile.json[0m
│ ├── [00mconst_tensor_data.bin[0m
│ ├── [00ml2m_footprint.json[0m
│ ├── [00ml2m_footprint.png[0m
│ ├── [00mregion_to_op.xlsx[0m
│ ├── [00mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_epu.qo[0m
│ ├── [00mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_epu.s[0m
│ └── [01;32mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_host[0m
├── [00mchimera_job.yaml[0m
├── [00mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1.cpp[0m
└── [01;34mrun[0m
└── [01;34m20260619_035509_9056e0[0m
├── [01;36mconst_tensor_data.bin[0m -> [00m/quadric/sdk-cli/examples/doc_template/ccl_build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build/const_tensor_data.bin[0m
├── [01;34mdata[0m
│ ├── [00mactivity_summary.json[0m
│ ├── [00mcompile_run_io_settings.json[0m
│ ├── [00mpower_summary.json[0m
│ ├── [00mpower_summary_per_core.json[0m
│ └── [00mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1.combined.png[0m
├── [00minput.bin[0m
├── [00miss_run_log.txt[0m
├── [00moutput.bin[0m
├── [00mpower_def.json[0m
├── [00mpower_profile.json[0m
├── [00mprofile.json[0m
├── [01;36mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_epu.qo[0m -> [00m/quadric/sdk-cli/examples/doc_template/ccl_build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_epu.qo[0m
└── [01;36mresnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_host[0m -> [01;32m/quadric/sdk-cli/examples/doc_template/ccl_build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build/resnet18_opt_asym_int8_q_QC_U_1d7_4MB_4kB_128GBps_128GBps_16_OFF_x1_x1_host[0m
6 directories, 34 files
Overview
When you compile a model using the SDK Graph Compiler, it creates a structured output directory in ccl_build/ containing the compiled model, build artifacts, and runtime data. This document walks you through the directory structure and explains the significance of key files.
Root Directory Structure
ccl_build/
└── {module_name}/
The main output directory is named after the model with configuration parameters embedded in the name. In this example, {module_name} represents resnet_18_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_x1, which indicates:
resnet_18: The model nameQC_U_1d7: Product line (QC_U) and clock speed (1.7 GHz)16MB_4kB: Memory configuration (16MB L2M memory, 4kB LRM memory)128GBps_128GBps: Memory bandwidth parameters16_x1: MACs per processing element (16) and core complex configuration (1 core)
Main Files in the Root Directory
ccl_build/{module_name}/
├── CMakeLists.txt
├── chimera_job.yaml
└── {module_name}.cpp
CMakeLists.txt: Configuration file for CMake build system that defines build targets and dependencies.
chimera_job.yaml: Job configuration file that specifies the network's inputs and outputs, along with hardware parameters and simulation settings. This file contains model-specific information that will vary depending on the model being compiled. For example, in this ResNet-18 run, it defines:
- Inputs: Information about input tensors (e.g., a single input tensor named "input.1" with shape [1,3,224,224] in NCHW format)
- Outputs: Information about output tensors (e.g., an output tensor with ID "192" with shape [1,1000])
- File mappings: Names for input and output data files (e.g., input_1.bin and 192.bin)
Here's the complete contents of this file for the current run:
ccl_available: true inputs: input.1: shape: - 1 - 3 - 224 - 224 filename: input_1.bin dim_order: NCHW type: tensor[FixedPoint32<27>] outputs: '192': shape: - 1 - 1000 filename: 192.bin type: tensor[FixedPoint32<26>]The actual tensor shapes, names, and precisions will vary depending on the neural network being compiled.
{module_name}.cpp: Generated C++ source code containing the host-side implementation for the compiled model.
Build Directory
ccl_build/{module_name}/build/
The build directory contains all compilation artifacts, including:
Key Build Output Files
- {module_name}_host: Executable host binary that loads and runs the compiled EPU binary.
- {module_name}_epu.qo: Compiled binary for the EPU (Edge Processing Unit) target.
- {module_name}_epu.s: Assembly representation of the compiled EPU code.
- const_tensor_data.bin: Binary file containing constant tensor data (weights, biases) for the neural network.
Analysis and Debug Files
- compile_commands.json: Contains compilation commands for each source file (useful for IDE integration).
- compile_profile.json: Contains static information and memory utilization statistics from the compilation process.
- command_log.txt: Detailed log of LLVM compilation commands executed during the build process, including compiler flags and optimization settings.
- l2m_footprint.json: Memory footprint analysis in JSON format showing LRM and L2M memory usage statistics.
- l2m_footprint.png: Visual graph showing memory tenancy over the course of program execution, with program index (call ID) on the x-axis.
- region_to_op.xlsx: Excel file mapping Fusion in Local Memory (FILM) Regions to neural network operations.
Run Directory
ccl_build/{module_name}/run/20250415_103400_16d61f/
The run directory contains execution results and is named with a timestamp (YYYYMMDD_HHMMSS_UNIQUEID). Each run gets its own timestamped directory, allowing you to maintain a history of executions. To save on data redundancy when rerunning the same network across many images, files like const_tensor_data.bin are implemented as symbolic links to their source files in the build directory, since weights and biases don't change between runs.
Input/Output Files
- input_1.bin: Binary file containing the input tensor data. The name "input_1" corresponds to the input tensor name in the source ONNX file, and its format is specified in chimera_job.yaml.
- 192.bin: Output binary file containing inference results. The name "192" corresponds to the output tensor ID in the source ONNX file, and is referenced in chimera_job.yaml.
- const_tensor_data.bin: Symbolic link to the constants data in the build directory.
- {module_name}_epu.qo: Symbolic link to the EPU binary.
- {module_name}_host: Symbolic link to the host executable.
Performance and Analysis Files
- iss_run_log.txt: Instruction set simulator (ISS) log file with FILM Region by FILM Region execution details.
- profile.json: Performance profile summaries broken down by FILM region and summarizes total execution information.
- power_profile.json: FILM region activity and power information summarized by FILM region.
Data Subdirectory
ccl_build/{module_name}/run/20250415_103400_16d61f/data/
Contains additional analysis files:
- activity_summary.json: Summary of computational activity.
- compile_run_io_settings.json: Comprehensive summary of model configuration and performance metrics, including:
- Module configuration details (product target, clock frequency, memory sizes)
- Input/output tensor specifications (shapes, data types)
- Performance statistics (latency, FPS, power consumption)
- Memory utilization metrics (external read/write bytes, bandwidth usage)
- Efficiency metrics (MAC utilization, FPS per Watt)
- power_summary.json: Summary of power consumption statistics.
- power_summary_per_core.json: Per-core power consumption breakdown.
- {module_name}.combined.png: Visual performance analysis dashboard with four key charts:
- Top Left: Execution cycles broken down by FILM Region showing compute, data array, MAC, data external, and data OCM operations per region
- Top Right: Aggregate cycle counts by operation category across the entire model
- Bottom Left: Power consumption by FILM Region with breakdown by component type (Core, Int, Qls, Nb, NBR) and average power line
- Bottom Right: External bandwidth utilization by FILM Region showing load (read) and store (write) bandwidth
Conclusion
The SDK Graph Compiler generates a comprehensive set of files that support model deployment, performance analysis, and debugging. Understanding this directory structure will help you effectively work with compiled models and optimize their performance for your target hardware.