UH-OH

It looks like you don’t have access to that feature yet

Contact sales to get upgraded to the full DevStudio experience.

UH-OH

It looks like you don't have access to that feature yet.

to select
to navigate
escto close
Introduction to the Chimera SDK
Chimera SDK Quick Start Guide
Chimera SDK Command Line Interface (CLI)
Tutorial: Using SDK as a Library
Chimera Graph Compiler (CGC)
Chimera LLVM C++ Compiler
Chimera SDK Licensing Policy Documentation
Glossary
Chimera Software User GuideChimera Graph Compiler (CGC)Preparing a Model for CompilationTutorial: Measuring Performance of a Custom Op

Tutorial: Measuring Performance of a Custom Op


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/custom_op/prototype_custom_op_perf.ipynb.


import tvm.contrib.epu.graphutils as graphutils
import onnx
import os, pathlib
import logging
import onnxruntime

from tvm.contrib.epu.chimera_job.chimera_job import ChimeraJob

onnx_file = "./ultraface_quant_v2.onnx"

onnx_session = onnxruntime.InferenceSession(onnx_file)
model = onnx.load(onnx_file)

start

image-3.png

util = graphutils.CustomOpReplacer(model)
_, custom_model = util.replace_subgraph(
    "concat_output_1",
    [
        "Transpose_48",
        "Transpose_70",
        "Transpose_88",
        "Transpose_102",
        "Transpose_53",
        "Transpose_75",
        "Transpose_93",
        "Transpose_105",
    ],
    "ultrafaceBoundingBox",
    False,
    keep_constants=[
        "317_scale",
        "363_scale",
        "403_scale",
        "435_scale",
        "331_scale",
        "377_scale",
        "417_scale",
        "447_scale",
        "467_quantized",
        "467_scale",
        "465_quantized",
        "465_scale",
    ],
)
onnx_file_custom = os.path.basename(onnx_file.replace(".onnx", "-prototype_custom_op.onnx"))
print(onnx_file_custom)
onnx.save(custom_model, onnx_file_custom)
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: concat_output_0
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: scores_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 459_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 328_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 317_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 316
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 315_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 314
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 313_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 309_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 308_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 289_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 288
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 286_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 284_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 283
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 281_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 280
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 278_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 277
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 275_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 274
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 272_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 271
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 269_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 268
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 266_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 265
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 263_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 262
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 260_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 259
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 257_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 256
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 254_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 253
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 251_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 250
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 248_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 247
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 245_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 296_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 295
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 293_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 291_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 306_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 305
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 303_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 302
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 300_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 298_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 311_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 374_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 363_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 362
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 361_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 360
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 358_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 357
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 355_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 354
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 352_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 351
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 349_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 348
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 346_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 345
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 343_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 414_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 403_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 402
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 401_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 400
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 398_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 397
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 395_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 394
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 392_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 391
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 389_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 446_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 435_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 434
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 433_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 432
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 431_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 430
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 429_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: boxes_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 480
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 481
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 475_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 468_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 466_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 464_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 462
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 460_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 342_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 331_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 330
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 329_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 388_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 377_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 376
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 375_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 428_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 417_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 416
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 415_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 458_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 447_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 474_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 472
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 471_quantized
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 469
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 484
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 482
WARNING:root:ONNX node does not have a name, deriving temp name from its outputs. Node was named to: 485_quantized


ultraface_quant_v2-prototype_custom_op.onnx

end

image-2.png

Automatically generating the required CCL (C++) prototypes for Custom Op's in header files

cgc_job = ChimeraJob(model_p=onnx_file_custom)
custom_file = cgc_job.analyze_network()
2026-06-19 03:59 - INFO - epu - chimera_job - START==================================onnx_ingest
2026-06-19 03:59 - INFO - epu - codegen - START===============================optimize_relay
2026-06-19 03:59 - INFO - epu - codegen - START====================quantize_to_cpu_runnable_fx
2026-06-19 03:59 - INFO - epu - fx - 

Source name                     Op                             Output 0 Range                   Output 0 Frac Bits
------------------------------  -----------------------------  -----------------------------  --------------------
CustomOp/ultrafaceBoundingBox0  contrib.epu.quadric_custom_op  (-32768.0, 32767.99998474121)                    16



Analysis of ultraface_quant_v2-prototype_custom_op.onnx


2026-06-19 03:59 - INFO - epu - chimera_job - Function Prototypes for Custom OPs found
2026-06-19 03:59 - INFO - epu - chimera_job - Please see the file: ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1_analyze_custom_op_template.hpp for a template example of custom op implementation


List of custom ops found in the network:
ultrafaceBoundingBox



2026-06-19 03:59 - INFO - epu - chimera_job - Wrote custom op seed file to ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1_analyze_custom_op_template.hpp.
## The analyze command will generate a custom op template file that can be used for compliation!!!
!cat {custom_file}
template <typename OcmAllocatorType> void ultrafaceBoundingBox (DdrTensor <std::int8_t, 1, 6, 30, 40>& ext_tensor_in0  /* 317_quantized */ ,
	DdrTensor <std::int8_t, 1, 4, 15, 20>& ext_tensor_in1  /* 363_quantized */ ,
	DdrTensor <std::int8_t, 1, 4, 8, 10>& ext_tensor_in2  /* 403_quantized */ ,
	DdrTensor <std::int8_t, 1, 6, 4, 5>& ext_tensor_in3  /* 435_quantized */ ,
	DdrTensor <std::int8_t, 1, 12, 30, 40>& ext_tensor_in4  /* 331_quantized */ ,
	DdrTensor <std::int8_t, 1, 8, 15, 20>& ext_tensor_in5  /* 377_quantized */ ,
	DdrTensor <std::int8_t, 1, 8, 8, 10>& ext_tensor_in6  /* 417_quantized */ ,
	DdrTensor <std::int8_t, 1, 12, 4, 5>& ext_tensor_in7  /* 447_quantized */ ,
	FixedPoint32<31> scalar_in8  /* 317_quantized.317_scale */ ,
	FixedPoint32<31> scalar_in9  /* 363_quantized.363_scale */ ,
	FixedPoint32<31> scalar_in10  /* 403_quantized.403_scale */ ,
	FixedPoint32<31> scalar_in11  /* 435_quantized.435_scale */ ,
	FixedPoint32<31> scalar_in12  /* 331_quantized.331_scale */ ,
	FixedPoint32<31> scalar_in13  /* 377_quantized.377_scale */ ,
	FixedPoint32<31> scalar_in14  /* 417_quantized.417_scale */ ,
	FixedPoint32<31> scalar_in15  /* 447_quantized.447_scale */ ,
	DdrTensor <std::int8_t, 1, 4420, 2>& const_in16  /* CustomOp/ultrafaceBoundingBox0.467_quantized */ ,
	FixedPoint32<31> scalar_in17  /* CustomOp/ultrafaceBoundingBox0.467_scale */ ,
	DdrTensor <std::int8_t, 1, 4420, 2>& const_in18  /* CustomOp/ultrafaceBoundingBox0.465_quantized */ ,
	FixedPoint32<31> scalar_in19  /* CustomOp/ultrafaceBoundingBox0.465_scale */ ,
	DdrTensor <FixedPoint32<16>, 1, 6, 4420>& ext_tensor_in20  /* CustomOp/ultrafaceBoundingBox0 */ ,
	 OcmAllocatorType&                        ocmMem) {
 /* User implementation of custom op */ 

}

Compile network with custom op prototype stub

cgc_job = ChimeraJob(
    model_p=onnx_file_custom,
    custom_ops=custom_file,
)
cgc_job.compile()
2026-06-19 03:59 - INFO - epu - chimera_job - START==================================onnx_ingest
2026-06-19 03:59 - INFO - epu - codegen - START===============================optimize_relay
2026-06-19 03:59 - INFO - epu - codegen - START====================quantize_to_cpu_runnable_fx
2026-06-19 03:59 - INFO - epu - fx - 

Source name                     Op                             Output 0 Range                   Output 0 Frac Bits
------------------------------  -----------------------------  -----------------------------  --------------------
CustomOp/ultrafaceBoundingBox0  contrib.epu.quadric_custom_op  (-32768.0, 32767.99998474121)                    16

2026-06-19 03:59 - INFO - epu - codegen - START====================build_cpu_runnable_fx_relay
2026-06-19 03:59 - INFO - epu - codegen - START=======================quantize_to_chimera_fx
2026-06-19 03:59 - INFO - epu - codegen - START=================================relay_to_tir
2026-06-19 03:59 - INFO - epu - codegen - START===========================relay_to_epu_relay
2026-06-19 03:59 - INFO - epu - codegen - START==============================adapt_and_order
2026-06-19 03:59 - INFO - epu - mac_counter - 
2026-06-19 03:59 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:59 - INFO - epu - mac_counter - MAC Operation Count Summary
2026-06-19 03:59 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 16,588,800 ops (8,294,400 MACs) - 245_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 248_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 19,660,800 ops (9,830,400 MACs) - 251_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 254_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 257_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 260_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 263_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 266_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 4,915,200 ops (2,457,600 MACs) - 269_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 272_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 275_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 278_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 281_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 284_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 286_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 289_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 291_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 293_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 296_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 298_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,073,600 ops (1,036,800 MACs) - 300_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 4,147,200 ops (2,073,600 MACs) - 303_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 306_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 7,372,800 ops (3,686,400 MACs) - 309_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 311_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 315_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 921,600 ops (460,800 MACs) - 317_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 345,600 ops (172,800 MACs) - 343_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 4,915,200 ops (2,457,600 MACs) - 346_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 349_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 352_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 355_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 358_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 361_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 307,200 ops (153,600 MACs) - 363_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 184,320 ops (92,160 MACs) - 389_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 5,242,880 ops (2,621,440 MACs) - 392_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 395_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 10,485,760 ops (5,242,880 MACs) - 398_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 401_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 163,840 ops (81,920 MACs) - 403_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 2,621,440 ops (1,310,720 MACs) - 429_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 23,040 ops (11,520 MACs) - 431_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 655,360 ops (327,680 MACs) - 433_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 552,960 ops (276,480 MACs) - 435_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 329_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,843,200 ops (921,600 MACs) - 331_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 375_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 614,400 ops (307,200 MACs) - 377_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 415_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 327,680 ops (163,840 MACs) - 417_quantized
2026-06-19 03:59 - INFO - epu - mac_counter -   conv2d: 1,105,920 ops (552,960 MACs) - 447_quantized
2026-06-19 03:59 - INFO - epu - mac_counter - ------------------------------------------------------------
2026-06-19 03:59 - INFO - epu - mac_counter - Total: 200,837,120 ops (100,418,560 MACs)
2026-06-19 03:59 - INFO - epu - mac_counter - ============================================================
2026-06-19 03:59 - INFO - epu - mac_counter - 
2026-06-19 03:59 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:59 - INFO - epu - codegen - START=============================plan_lrm_virtual
2026-06-19 03:59 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:59 - INFO - epu - codegen - START===============================lrm_alloc_loop
2026-06-19 03:59 - INFO - epu - codegen - START==============================amend_ctrl_flow
2026-06-19 03:59 - INFO - epu - codegen - START================================lrm_splitting
2026-06-19 04:00 - INFO - epu - fuse_weights - No optimization for node 306_quantized with properties { kernel_size: [3, 3], channels: 16, strides:[1, 1], padding:[5, 5, 5, 5], data_layout:NCHW, dilation:[5, 5], groups:1, kernel_layout:OIHW, out_dtype:int8, out_layout: }.Applying General Convolution algorithm. Performance for this node can be improved significantly. Please refer to the documentation or contact Quadric Support.
2026-06-19 04:00 - INFO - epu - fuse_weights - No optimization for node 289_quantized with properties { kernel_size: [3, 3], channels: 16, strides:[1, 1], padding:[2, 2, 2, 2], data_layout:NCHW, dilation:[2, 2], groups:1, kernel_layout:OIHW, out_dtype:int8, out_layout: }.Applying General Convolution algorithm. Performance for this node can be improved significantly. Please refer to the documentation or contact Quadric Support.
2026-06-19 04:00 - INFO - epu - fuse_weights - No optimization for node 296_quantized with properties { kernel_size: [3, 3], channels: 16, strides:[1, 1], padding:[3, 3, 3, 3], data_layout:NCHW, dilation:[3, 3], groups:1, kernel_layout:OIHW, out_dtype:int8, out_layout: }.Applying General Convolution algorithm. Performance for this node can be improved significantly. Please refer to the documentation or contact Quadric Support.
2026-06-19 04:00 - INFO - epu - codegen - START==============================ext_split_relay
2026-06-19 04:01 - INFO - epu - codegen - START====================================build_tir
2026-06-19 04:01 - INFO - epu - chimera_job - Compilation of ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1 successful

Evaluate performance of the network with an Empty Custom Operation

cgc_job.run_inference_harness()
print(cgc_job)
cgc_job.plot_run_statistics()
2026-06-19 04:01 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x7b2be76579d0>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:04<00:00,  3.15it/s]
2026-06-19 04:01 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x7b2d24d8db40>
2026-06-19 04:01 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-06-19 04:01 - INFO - epu - iss_testing - Done 0:00:00.053078



╒═════════════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕
 Module Name          ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1                                                                    
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 ONNX File            ultraface_quant_v2-prototype_custom_op.onnx                                                                                                              
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Custom Ops           /quadric/sdk-cli/examples/custom_op/ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1_analyze_custom_op_template.hpp 
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Product Target       QC-U                                                                                                                                                     
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Number of Cores      1                                                                                                                                                        
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 ISS Clock Frequency  1.700                                                                                                                                                    
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 L2M Size             16MB                                                                                                                                                     
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 LRM Size             4kB                                                                                                                                                      
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 External Read BW     128GBps                                                                                                                                                  
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 External Write BW    128GBps                                                                                                                                                  
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 MACS per PE          16                                                                                                                                                       
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Max L2M              1.107MB                                                                                                                                                  
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Max LRM              0.506kB                                                                                                                                                  
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Max Temp Ext Bytes   0.127MB                                                                                                                                                  
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 Network GMACs        0.100                                                                                                                                                    
╘═════════════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╛
NOTE: CGC has used general convolution for some nodes, which may result in suboptimal performance. For performance-critical applications, please contact Quadric support to explore optimization strategies.
General convolution nodes: 306_quantized, 289_quantized, 296_quantized
For more details, see: https://app.quadric.ai/docs/latest/chimera-software-user-guide/chimera-graph-compiler-cgc/graph-optimizations-performed-by-cgc#general-convolution


╒════╤════════╤═════════════════╤══════════════════╤══════════════════════════╤═══════╕
     Type    Name             shape             type                      mse   
╞════╪════════╪═════════════════╪══════════════════╪══════════════════════════╪═══════╡
  0  Input   input            [1, 3, 240, 320]  tensor[FixedPoint32<27>]  n/a   
├────┼────────┼─────────────────┼──────────────────┼──────────────────────────┼───────┤
  1  Output  concat_output_1  [1, 6, 4420]      tensor[FixedPoint32<16>]  0.370 
╘════╧════════╧═════════════════╧══════════════════╧══════════════════════════╧═══════╛

Post-ISS Report 1.7 GHz ***
Fully placed-and-routed gate simulation: 
╒══════════════════════════════════╤═════════╕
 Latency (ms)                      0.19    
├──────────────────────────────────┼─────────┤
 FPS                               5240.12 
├──────────────────────────────────┼─────────┤
 Average Power @ 3nm SSGNP (mW)    1375.14 
├──────────────────────────────────┼─────────┤
 FPS per Watt @ 3nm SSGNP (FPS/W)  3810.61 
├──────────────────────────────────┼─────────┤
 Ext Rd Bytes (MB)                 1.25    
├──────────────────────────────────┼─────────┤
 Ext Wr Bytes (MB)                 0.03    
├──────────────────────────────────┼─────────┤
 Avg Ext Rd BW (GBps)              6.42    
├──────────────────────────────────┼─────────┤
 Avg Ext Wr BW (GBps)              0.13    
├──────────────────────────────────┼─────────┤
 MAC Utilization                   1.89%   
╘══════════════════════════════════╧═════════╛
*** Data generated using 7nm SSGNP gatesim and scaled to 3nm

[SDK-CLI] : TotalCycles: 324,420
[SDK-CLI] : Executions/second: 5,240.12

compute      : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 135.474K
data_array   : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 62.284K
mac          : ▇▇▇▇▇▇▇▇▇▇▇▇▇ 36.557K
data_external: ▇▇▇ 10.185K
data_ocm     : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 79.799K

for more information check run directory: /quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260619_040116_e35fc6


2026-06-19 04:01 - INFO - epu - chimera_job - Combined plots generated and saved to: 
/quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260619_040116_e35fc6/data/ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1.combined.png





'/quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_prototype_custom_op_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20260619_040116_e35fc6/data'


Table of Contents
Introduction to the Chimera SDK
Chimera SDK Quick Start Guide
Chimera SDK Command Line Interface (CLI)
Tutorial: Using SDK as a Library
Chimera Graph Compiler (CGC)
Chimera LLVM C++ Compiler
Chimera SDK Licensing Policy Documentation
Glossary


© Copyright 2026 Quadric All Rights Reserved • Privacy Policy
This documentation is preliminary and confidential. It is subject to change. Quadric does not give any warranty express or implied that the contents will be complete or accurate or up to date. The company shall not be liable for any loss, actions, claims, proceedings, demands or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of this material.

Sign in to your account

Don't have an account? Create an Account
By signing in, you are agreeing to our Terms of Use and Privacy Policy.

Develop.

Simulate.

Profile.

Collaborate.

We use cookies to enhance your browsing experience, and analyze our traffic.
By clicking "Accept All", you consent to our use of cookies.