Unlock this feature

This feature isn’t part of your plan yet

Contact sales to get upgraded to the full DevStudio experience.

Unlock this feature

This feature isn't part of your plan yet.

Custom Ops, a Practical Tutorial: Ultraface


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/ultraface_custom_op.ipynb.


License Notice

UltraFace is released by Linzaer under the MIT licence. The UltraFace weights this notebook uses are trained on the WIDER FACE dataset, whose page gives its licence as "Creative Common License (cc by-nc-nd)": http://shuoyang1213.me/WIDERFACE/ The face annotations used in training are RetinaFace's, distributed by InsightFace, which states: "The training data containing the annotation (and the models trained with these data) are available for non-commercial research purposes only." https://github.com/deepinsight/insightface#license

UltraFace with the shipped plugin bundle

UltraFace is a small face detector. Its quantized export, ultraface_quant_v2.onnx, ends in a bounding-box tail: eight prediction heads, each a Transpose and Reshape, joined by two QLinearConcats, a softmax over the class scores, the SSD anchor decode over the box regressions, and a final Concat into concat_output_1. That tail runs as one custom op, usercustom::ultrafaceBoundingBox.

The plugin's shipped library carries the bundle for it, ultraface: a topology pattern of the whole tail and twelve kept constants (the eight head scales and the two prior tensors with their scales). The library applies to every compile, so this notebook never names the region or passes a header. It compiles with the plugin's ChimeraJob, prints the kernel the bundle binds, and runs the detector on face images through the ISS and through ONNX Runtime, comparing the boxes after NMS. For the perf-only variant with an empty prototype of the kernel, see prototype_custom_op_perf.ipynb.

#partwhat it does
1SetupThe model, and an ONNX Runtime session on it for the reference boxes.
2CompileThe plugin's ChimeraJob on the model: the shipped bundle replaces the tail, then CGC compiles.
3The kernelThe CCL the bundle binds, printed from the shipped library.
4Boxes on the ISS against ONNX RuntimeThe detector on face images through both engines, NMS on each output, boxes drawn side by side with the mean IoU.
5ProfileThe job summary and the run statistics plot.

1. Setup

Imports the plugin's ChimeraJob and default_library_dir. Opens an ONNX Runtime session on the quantized model; its output is the reference the ISS boxes are compared with. Prints the node count and the output name.

from pathlib import Path

import onnx
import onnxruntime

from sdk_cli.cgc_plugin import default_library_dir
from sdk_cli.cgc_plugin.chimera_job import ChimeraJob
from sdk_cli.utils.model_helpers import example_path

onnx_file = example_path("custom_op/ultraface_quant_v2.onnx")
onnx_session = onnxruntime.InferenceSession(str(onnx_file))
model = onnx.load(str(onnx_file))
print(f"{onnx_file.name}: {len(model.graph.node)} nodes, output {model.graph.output[0].name}")
ultraface_quant_v2.onnx: 213 nodes, output concat_output_1

2. Compile

The region the bundle replaces starts at the eight Transpose nodes and ends at concat_output_1:

start end

Builds the plugin's ChimeraJob on the model. The constructor applies the shipped library: the ultraface bundle matches the tail once and replaces it with one customOp. Prints plugin_result, the node count before and after, the customOp's operand count and its output. The assertion pins the matched bundle. Then compiles.

cgc_job = ChimeraJob(
    model_p=str(onnx_file), plugin_out_dir=str(example_path("custom_op") / "_plugin_out_ultraface")
)
print(cgc_job.plugin_result)
assert cgc_job.plugin_result.matched_plugins == ("ultraface",), cgc_job.plugin_result

substituted = onnx.load(cgc_job.plugin_result.model_path)
custom_op = next(n for n in substituted.graph.node if n.op_type.startswith("QuadricCustomOp"))
print(f"{len(model.graph.node)} nodes -> {len(substituted.graph.node)} nodes")
print(
    f"{custom_op.op_type} '{custom_op.name}': {len(custom_op.input)} operands -> {list(custom_op.output)}"
)

cgc_job.compile()
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: _softmax_out
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


cgc plugin: 1 customOp(s) from ultraface (QLinearSoftmax unfolded by the SDK) -> /quadric/sdk-cli/examples/custom_op/_plugin_out_ultraface
213 nodes -> 167 nodes
QuadricCustomOp 'CustomOp/usercustom::ultrafaceBoundingBox0': 20 operands -> ['concat_output_1']


2026-10-23 00:50 - INFO - epu - chimera_job - START==================================onnx_ingest
2026-10-23 00:50 - INFO - epu - util - START===============================optimize_relay
2026-10-23 00:51 - INFO - epu - util - START====================quantize_to_cpu_runnable_fx
2026-10-23 00:51 - INFO - epu - fx - 

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

2026-10-23 00:51 - INFO - epu - util - START====================build_cpu_runnable_fx_relay
2026-10-23 00:51 - INFO - epu - util - START=======================quantize_to_chimera_fx
2026-10-23 00:51 - INFO - epu - util - START=================================relay_to_tir
2026-10-23 00:51 - INFO - epu - util - START===========================relay_to_epu_relay
2026-10-23 00:51 - INFO - epu - util - START==============================adapt_and_order
2026-10-23 00:51 - INFO - epu - mac_counter - 
2026-10-23 00:51 - INFO - epu - mac_counter - ============================================================
2026-10-23 00:51 - INFO - epu - mac_counter - MAC Operation Count Summary
2026-10-23 00:51 - INFO - epu - mac_counter - ============================================================
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 16,588,800 ops (8,294,400 MACs) - 245_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 248_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 19,660,800 ops (9,830,400 MACs) - 251_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 254_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 257_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 260_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 263_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 266_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 4,915,200 ops (2,457,600 MACs) - 269_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 272_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 275_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 278_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 281_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 284_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 286_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 289_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 291_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,764,800 ops (1,382,400 MACs) - 293_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 296_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,228,800 ops (614,400 MACs) - 298_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,073,600 ops (1,036,800 MACs) - 300_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 4,147,200 ops (2,073,600 MACs) - 303_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 5,529,600 ops (2,764,800 MACs) - 306_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 7,372,800 ops (3,686,400 MACs) - 309_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 311_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 315_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 921,600 ops (460,800 MACs) - 317_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 345,600 ops (172,800 MACs) - 343_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 4,915,200 ops (2,457,600 MACs) - 346_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 349_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 352_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 355_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 9,830,400 ops (4,915,200 MACs) - 358_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 361_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 307,200 ops (153,600 MACs) - 363_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 184,320 ops (92,160 MACs) - 389_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 5,242,880 ops (2,621,440 MACs) - 392_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 395_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 10,485,760 ops (5,242,880 MACs) - 398_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 401_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 163,840 ops (81,920 MACs) - 403_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 2,621,440 ops (1,310,720 MACs) - 429_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 23,040 ops (11,520 MACs) - 431_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 655,360 ops (327,680 MACs) - 433_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 552,960 ops (276,480 MACs) - 435_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,382,400 ops (691,200 MACs) - 329_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,843,200 ops (921,600 MACs) - 331_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 691,200 ops (345,600 MACs) - 375_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 614,400 ops (307,200 MACs) - 377_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 368,640 ops (184,320 MACs) - 415_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 327,680 ops (163,840 MACs) - 417_quantized
2026-10-23 00:51 - INFO - epu - mac_counter -   conv2d: 1,105,920 ops (552,960 MACs) - 447_quantized
2026-10-23 00:51 - INFO - epu - mac_counter - ------------------------------------------------------------
2026-10-23 00:51 - INFO - epu - mac_counter - Total: 200,837,120 ops (100,418,560 MACs)
2026-10-23 00:51 - INFO - epu - mac_counter - ============================================================
2026-10-23 00:51 - INFO - epu - mac_counter - 
2026-10-23 00:51 - INFO - epu - util - START==============================amend_ctrl_flow
2026-10-23 00:51 - INFO - epu - util - START=============================plan_lrm_virtual
2026-10-23 00:51 - INFO - epu - util - START==============================amend_ctrl_flow
2026-10-23 00:51 - INFO - epu - util - START===============================lrm_alloc_loop
2026-10-23 00:51 - INFO - epu - util - START==============================amend_ctrl_flow
2026-10-23 00:51 - INFO - epu - util - START================================lrm_splitting
2026-10-23 00:51 - INFO - epu - util - START=====================LrmUsageChecker.__call__
2026-10-23 00:51 - 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-10-23 00:51 - 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-10-23 00:51 - 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-10-23 00:51 - INFO - epu - util - START==============================ext_split_relay
2026-10-23 00:51 - INFO - epu - util - START=========================OcmAllocator.analyze
2026-10-23 00:51 - INFO - epu - util - START===============================Compiler.build
2026-10-23 00:51 - INFO - epu - util - START========================RelayToPrimFunc.build
2026-10-23 00:51 - INFO - epu - util - START=========================OcmAllocator.analyze
2026-10-23 00:51 - INFO - epu - util - START====================================build_tir
2026-10-23 00:52 - INFO - epu - chimera_job - Compilation of ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1 successful

3. The kernel

Prints kernel.hpp from the library's ultraface bundle folder: usercustom::ultrafaceBoundingBox, the softmax, anchor decode and concat of the tail in CCL.

kernel = Path(default_library_dir()) / "ultraface" / "kernel.hpp"
print(f"{kernel}\n")
print(kernel.read_text())
/quadric/sdk-cli/sdk_cli/cgc_plugin/library/ultraface/kernel.hpp

#pragma once
#include <quadric/qil.h>

namespace chimera {
  namespace usercustom {
    /**
     * @brief This handles computation of a single input for scores. This is called on for each of the 4 inputs.
     * A minRoi is setup with shape (depth, core_dim, width). Tiles within minRoi are fetched along channels first and
     * then width. MinRoi moves only in height within tensor. An output tile is generated after every 2 tiles since we
     * already have enough data to compute a region of the output. This output tile is then
     * written to OCM tensor via RAU.
     *
     * @tparam ScoresInputOcmTensor
     * @tparam  ScoresScaleFB
     * @tparam ScoresOutputOcmTensor
     * @param scoresInputOcm
     * @param scoresScale
     * @param scoresOutputOcm
     * @param outWidthOffset
     */
    template <typename ScoresInputOcmTensor, FracRepType ScoresScaleFB, typename ScoresOutputOcmTensor>
    INLINE void ultrafaceBoundingBoxScoresSingleInput(ScoresInputOcmTensor&              scoresInputOcm,
                                                      const FixedPoint32<ScoresScaleFB>& scoresScale,
                                                      ScoresOutputOcmTensor&             scoresOutputOcm,
                                                      std::int32_t                       outWidthOffset) {
      using inpElemType               = typename ScoresInputOcmTensor::elemType;
      using elemType                  = typename ScoresOutputOcmTensor::elemType;
      constexpr std::int32_t depth    = ScoresInputOcmTensor::NUM_CHN;
      constexpr std::int32_t height   = ScoresInputOcmTensor::NUM_ROWS;
      constexpr std::int32_t width    = ScoresInputOcmTensor::NUM_COLS;
      constexpr std::int32_t numTiles = ScoresInputOcmTensor::NUM_TILES;

      // Note: ROI, and input ocm tensor are the same shape for all inputs
      using MinRoiTensor = OcmTensor<inpElemType, depth, core_array::coreDim, width>;

      // MinRoiDesc describes how you iterate and process tiles within minRoi
      using MinRoiDesc = MinRoiDescriptor<MinRoiTensor,
                                          AxisGroup<Direction::Channel, Direction::Width, Direction::Height>,
                                          Granularity::Square>;

      // Access describes the overall access description including MinRoiDesc and movement of minRoi within ROI
      using Access = TensorAccessor<MinRoiDesc, AxisGroup<Direction::Height, Direction::Channel, Direction::Width>>;

      // readFlow is the final object that connects the Access to the ROI
      ReadFlow<Access, ScoresInputOcmTensor> readFlow(scoresInputOcm);

      rau::config(scoresOutputOcm);
      constexpr std::int32_t numTilesInMinRoi = Access::MinRoiDesc::numTiles();
      // loop over minRois is handled by heightOffset loop; minRois only move in height
      for(std::int32_t heightOffset = 0; heightOffset < height; heightOffset += core_array::coreDim) {
        container::NDArray<qVar_t<inpElemType>, numTilesInMinRoi> qInput        = readFlow.read();
        std::int32_t                                              minRoiTileIdx = 0;
        // widthOffset and ChannelOffset loop over tiles within minROI
        for(std::int32_t widthOffset = 0; widthOffset < width; widthOffset += core_array::coreDim) {
          // skip by two since we will process two channels at a time.
          for(std::int32_t channelOffset = 0; channelOffset < depth; channelOffset += 2) {
            qVar_t<std::uint32_t> qInWidth  = widthOffset + qCol<>;
            qVar_t<std::uint32_t> qInHeight = heightOffset + qRow<>;
            qVar_t<std::uint32_t> qOutWidth =
              outWidthOffset + channelOffset / 2 + (depth / 2) * qInWidth + (depth / 2) * width * qInHeight;

            //  calculate soft max
            qVar_t<elemType> qX0 = static_cast<elemType>(qInput[minRoiTileIdx]) * scoresScale;
            qVar_t<elemType> qX1 = static_cast<elemType>(qInput[minRoiTileIdx + 1]) * scoresScale;

            qVar_t<elemType> qExp     = (qX0 > qX1) ? math::exp(qX1 - qX0) : math::exp(qX0 - qX1);
            qVar_t<elemType> qOutput0 = (qX0 > qX1) ? 1 / (1 + qExp) : qExp / (1 + qExp);
            qVar_t<elemType> qOutput1 = 1 - qOutput0;
            qVar_t<bool>     qValid   = (qInWidth < width) && (qInHeight < height);

            // calculate rau store addresses to transfer to OCM
            // depends on offsets
            qVar_t<std::uint32_t> qAddress = rau::computeAddr<ScoresOutputOcmTensor>(0, 0, 0, qOutWidth);
            if(qValid) {
              rau::store::oneTile(qAddress, qOutput0, scoresOutputOcm);
              qAddress = rau::computeAddr<ScoresOutputOcmTensor>(0, 0, 1, qOutWidth);
              rau::store::oneTile(qAddress, qOutput1, scoresOutputOcm);
            }
            minRoiTileIdx += 2;
          }
        }
      }
    }

    /**
     * @brief This is a helper function for calculating score elements (this is independent from coordinates)
     *
     * @tparam ScoresInputDdr0Tensor
     * @tparam ScoresScale0FB
     * @tparam ScoresInputDdr1Tensor
     * @tparam ScoresScale1FB
     * @tparam ScoresInputDdr2Tensor
     * @tparam ScoresScale2FB
     * @tparam ScoresInputDdr3Tensor
     * @tparam ScoresScale3FB
     * @tparam ScoresOutputOcmTensor
     * @tparam memAllocatorType
     * @param scoresInputDdr0
     * @param scoresScale0
     * @param scoresInputDdr1
     * @param scoresScale1
     * @param scoresInputDdr2
     * @param scoresScale2
     * @param scoresInputDdr3
     * @param scoresScale3
     * @param scoresOutputOcm
     * @param ocmMem
     */
    template <typename ScoresInputDdr0Tensor,
              FracRepType ScoresScale0FB,
              typename ScoresInputDdr1Tensor,
              FracRepType ScoresScale1FB,
              typename ScoresInputDdr2Tensor,
              FracRepType ScoresScale2FB,
              typename ScoresInputDdr3Tensor,
              FracRepType ScoresScale3FB,
              typename ScoresOutputOcmTensor,
              typename memAllocatorType>
    INLINE void ultrafaceBoundingBoxScores(ScoresInputDdr0Tensor&              scoresInputDdr0,
                                           const FixedPoint32<ScoresScale0FB>& scoresScale0,
                                           ScoresInputDdr1Tensor&              scoresInputDdr1,
                                           const FixedPoint32<ScoresScale1FB>& scoresScale1,
                                           ScoresInputDdr2Tensor&              scoresInputDdr2,
                                           const FixedPoint32<ScoresScale2FB>& scoresScale2,
                                           ScoresInputDdr3Tensor&              scoresInputDdr3,
                                           const FixedPoint32<ScoresScale3FB>& scoresScale3,
                                           ScoresOutputOcmTensor&              scoresOutputOcm,
                                           memAllocatorType&                   ocmMem) {
      using inpElemType               = typename ScoresInputDdr0Tensor::elemType;
      using elemType                  = typename ScoresOutputOcmTensor::elemType;
      constexpr std::int32_t numBoxes = ScoresOutputOcmTensor::NUM_COLS;

      using ScoresInputOcm0Tensor = OcmTensor<inpElemType, 1, 6, 30, 40>;
      using ScoresInputOcm1Tensor = OcmTensor<inpElemType, 1, 4, 15, 20>;
      using ScoresInputOcm2Tensor = OcmTensor<inpElemType, 1, 4, 8, 10>;
      using ScoresInputOcm3Tensor = OcmTensor<inpElemType, 1, 6, 4, 5>;

      // process scoresInputDdr0
      std::int32_t          widthOffset = 0;
      ScoresInputOcm0Tensor scoresInputOcm0;
      ocmMem.allocate(scoresInputOcm0);
      memCpy(scoresInputDdr0, scoresInputOcm0);
      ultrafaceBoundingBoxScoresSingleInput(scoresInputOcm0, scoresScale0, scoresOutputOcm, widthOffset);
      ocmMem.free(scoresInputOcm0);

      // process scoresInputDdr1
      widthOffset +=
        (ScoresInputOcm0Tensor::NUM_CHN / 2) * ScoresInputOcm0Tensor::NUM_ROWS * ScoresInputOcm0Tensor::NUM_COLS;
      ScoresInputOcm1Tensor scoresInputOcm1;
      ocmMem.allocate(scoresInputOcm1);
      memCpy(scoresInputDdr1, scoresInputOcm1);
      ultrafaceBoundingBoxScoresSingleInput(scoresInputOcm1, scoresScale1, scoresOutputOcm, widthOffset);
      ocmMem.free(scoresInputOcm1);

      // process scoresInputDdr2
      widthOffset +=
        (ScoresInputOcm1Tensor::NUM_CHN / 2) * ScoresInputOcm1Tensor::NUM_ROWS * ScoresInputOcm1Tensor::NUM_COLS;
      ScoresInputOcm2Tensor scoresInputOcm2;
      ocmMem.allocate(scoresInputOcm2);
      memCpy(scoresInputDdr2, scoresInputOcm2);
      ultrafaceBoundingBoxScoresSingleInput(scoresInputOcm2, scoresScale2, scoresOutputOcm, widthOffset);
      ocmMem.free(scoresInputOcm2);

      // process scoresInputDdr3
      widthOffset +=
        (ScoresInputOcm2Tensor::NUM_CHN / 2) * ScoresInputOcm2Tensor::NUM_ROWS * ScoresInputOcm2Tensor::NUM_COLS;
      ScoresInputOcm3Tensor scoresInputOcm3;
      ocmMem.allocate(scoresInputOcm3);
      memCpy(scoresInputDdr3, scoresInputOcm3);
      ultrafaceBoundingBoxScoresSingleInput(scoresInputOcm3, scoresScale3, scoresOutputOcm, widthOffset);
      ocmMem.free(scoresInputOcm3);
    }

    /**
     * @brief This handles computation of a single input for coordinates. This is called on for each of the 4 inputs.
     * A minRoi is setup with shape (depth, core_dim, width). Tiles within minRoi are fetched along channels first and
     * then width. MinRoi moves only in height within tensor. An output tile is generated after every 4 tiles since we
     * already have enough data to compute a region of the output. This output tile is then
     * written to OCM tensor via RAU. Weight tensors are accessed via RAU.
     *
     * @tparam CoordinatesInputOcmTensor
     * @tparam CoordinatesScaleFB
     * @tparam WeightsOcmTensor
     * @tparam WeightsScaleAddFB
     * @tparam WeightsScaleMulFB
     * @tparam CoordinatesOutputOcmTensor
     * @param coordinatesInputOcm
     * @param coordScale
     * @param weightsAddOcm
     * @param weightsScaleAdd
     * @param weightsMulOcm
     * @param weightsScaleMul
     * @param coordinatesOutputOcm
     * @param outWidthOffset width offset to concatenate result in width. THis is used when calculating RAU address
     */
    template <typename CoordinatesInputOcmTensor,
              FracRepType CoordinatesScaleFB,
              typename WeightsOcmTensor,
              FracRepType WeightsScaleAddFB,
              FracRepType WeightsScaleMulFB,
              typename CoordinatesOutputOcmTensor>
    INLINE void ultrafaceBoundingBoxCoordinatesSingleInput(CoordinatesInputOcmTensor&              coordinatesInputOcm,
                                                           const FixedPoint32<CoordinatesScaleFB>& coordScale,
                                                           WeightsOcmTensor&                       weightsAddOcm,
                                                           const FixedPoint32<WeightsScaleAddFB>&  weightsScaleAdd,
                                                           WeightsOcmTensor&                       weightsMulOcm,
                                                           const FixedPoint32<WeightsScaleMulFB>&  weightsScaleMul,
                                                           CoordinatesOutputOcmTensor&             coordinatesOutputOcm,
                                                           std::int32_t                            outWidthOffset) {
      using elemType    = typename CoordinatesOutputOcmTensor::elemType;
      using inpElemType = typename CoordinatesInputOcmTensor::elemType;

      constexpr std::int32_t depth    = CoordinatesInputOcmTensor::NUM_CHN;
      constexpr std::int32_t height   = CoordinatesInputOcmTensor::NUM_ROWS;
      constexpr std::int32_t width    = CoordinatesInputOcmTensor::NUM_COLS;
      constexpr std::int32_t numTiles = CoordinatesInputOcmTensor::NUM_TILES;

      // Note: ROI, and input ocm tensor are the same shape for all inputs
      using MinRoiTensor = OcmTensor<inpElemType, depth, core_array::coreDim, width>;

      // MinRoiDesc describes how you iterate and process tiles within minRoi
      using MinRoiDesc = MinRoiDescriptor<MinRoiTensor,
                                          AxisGroup<Direction::Channel, Direction::Width, Direction::Height>,
                                          Granularity::Square>;

      // Access describes the overall access description including MinRoiDesc and movement of minRoi within ROI
      using Access = TensorAccessor<MinRoiDesc, AxisGroup<Direction::Height, Direction::Channel, Direction::Width>>;

      // readFlow is the final object that connects the Access to the ROI
      ReadFlow<Access, CoordinatesInputOcmTensor> readFlow(coordinatesInputOcm);

      // Initialize qAddress
      constexpr std::int32_t numTilesInMinRoi = Access::MinRoiDesc::numTiles();
      // loop over minRois is handled by heightOffset loop; minRois only move in height
      for(std::int32_t heightOffset = 0; heightOffset < height; heightOffset += core_array::coreDim) {
        container::NDArray<qVar_t<inpElemType>, numTilesInMinRoi> qInput        = readFlow.read();
        std::int32_t                                              minRoiTileIdx = 0;
        // widthOffset and ChannelOffset loop over tiles within minROI
        for(std::int32_t widthOffset = 0; widthOffset < width; widthOffset += core_array::coreDim) {
          // skip by 4 since we will process 4 channels at a time.
          for(std::int32_t channelOffset = 0; channelOffset < depth; channelOffset += 4) {
            // calculate soft max
            qVar_t<elemType> qInput0 = static_cast<elemType>(qInput[minRoiTileIdx]) * coordScale;
            qVar_t<elemType> qInput1 = static_cast<elemType>(qInput[minRoiTileIdx + 1]) * coordScale;
            qVar_t<elemType> qInput2 = static_cast<elemType>(qInput[minRoiTileIdx + 2]) * coordScale;
            qVar_t<elemType> qInput3 = static_cast<elemType>(qInput[minRoiTileIdx + 3]) * coordScale;

            // calculate rau store addresses to transfer to OCM
            // depends on offsets
            qVar_t<std::uint32_t> qInWidth  = widthOffset + qCol<>;
            qVar_t<std::uint32_t> qInHeight = heightOffset + qRow<>;
            qVar_t<std::uint32_t> qOutWidth =
              outWidthOffset + channelOffset / 4 + (depth / 4) * qInWidth + (depth / 4) * width * qInHeight;
            qVar_t<bool> qValid = (qInWidth < width) && (qInHeight < height);

            // Note: shape of both weights is (1, 1, numBoxes, 2) while shape of output is  (1, 1, 2, numBoxes)
            // this is why the address offsets are transposed on weights relative to offsets for output tensor.
            qVar_t<std::uint32_t> qWeightAddress0 = rau::computeAddr<WeightsOcmTensor>(0, 0, qOutWidth, 0);
            qVar_t<std::uint32_t> qWeightAddress1 = rau::computeAddr<WeightsOcmTensor>(0, 0, qOutWidth, 1);

            rau::config(weightsAddOcm);
            qVar_t<inpElemType> qAdd0In = qValid ? rau::load::oneTile(qWeightAddress0, weightsAddOcm) : 0;
            qVar_t<elemType>    qAdd0   = static_cast<elemType>(qAdd0In) * weightsScaleAdd;
            qVar_t<inpElemType> qAdd1In = qValid ? rau::load::oneTile(qWeightAddress1, weightsAddOcm) : 0;
            qVar_t<elemType>    qAdd1   = static_cast<elemType>(qAdd1In) * weightsScaleAdd;

            rau::config(weightsMulOcm);
            qVar_t<inpElemType> qMul0In = qValid ? rau::load::oneTile(qWeightAddress0, weightsMulOcm) : 0;
            qVar_t<elemType>    qMul0   = static_cast<elemType>(qMul0In) * weightsScaleMul;
            qVar_t<inpElemType> qMul1In = qValid ? rau::load::oneTile(qWeightAddress1, weightsMulOcm) : 0;
            qVar_t<elemType>    qMul1   = static_cast<elemType>(qMul1In) * weightsScaleMul;

            // calculation
            qVar_t<elemType> qCenter0 = qMul0 * qInput0 / 10 + qAdd0;
            qVar_t<elemType> qCenter1 = qMul1 * qInput1 / 10 + qAdd1;
            qVar_t<elemType> qSide0   = qMul0 * math::exp(qInput2 / 5) / 2;
            qVar_t<elemType> qSide1   = qMul1 * math::exp(qInput3 / 5) / 2;

            qVar_t<elemType> qOutput0 = qCenter0 - qSide0;
            qVar_t<elemType> qOutput1 = qCenter1 - qSide1;
            qVar_t<elemType> qOutput2 = qCenter0 + qSide0;
            qVar_t<elemType> qOutput3 = qCenter1 + qSide1;

            rau::config(coordinatesOutputOcm);
            qVar_t<std::uint32_t> qOutAddress = rau::computeAddr<CoordinatesOutputOcmTensor>(0, 0, 0, qOutWidth);
            if(qValid) {
              rau::store::oneTile(qOutAddress, qOutput0, coordinatesOutputOcm);
              qOutAddress = rau::computeAddr<CoordinatesOutputOcmTensor>(0, 0, 1, qOutWidth);
              rau::store::oneTile(qOutAddress, qOutput1, coordinatesOutputOcm);
              qOutAddress = rau::computeAddr<CoordinatesOutputOcmTensor>(0, 0, 2, qOutWidth);
              rau::store::oneTile(qOutAddress, qOutput2, coordinatesOutputOcm);
              qOutAddress = rau::computeAddr<CoordinatesOutputOcmTensor>(0, 0, 3, qOutWidth);
              rau::store::oneTile(qOutAddress, qOutput3, coordinatesOutputOcm);
            }
            // update indices
            minRoiTileIdx += 4;
          }
        }
      }
    }

    /**
     * @brief This is a helper function for computing coordinates (independent calculation from scores)
     *
     * @tparam CoordinatesInputDdr0Tensor
     * @tparam CoordinatesScale0FB
     * @tparam CoordinatesInputDdr1Tensor
     * @tparam CoordinatesScale1FB
     * @tparam CoordinatesInputDdr2Tensor
     * @tparam CoordinatesScale2FB
     * @tparam CoordinatesInputDdr3Tensor
     * @tparam CoordinatesScale3FB
     * @tparam WeightsAddDdrTensor
     * @tparam WeightsScaleAddFB
     * @tparam WeightsMulDdrTensor
     * @tparam WeightsScaleMulFB
     * @tparam CoordinatesOutputOcmTensor
     * @tparam memAllocatorType
     * @param coordinatesInputDdr0
     * @param coordScale0
     * @param coordinatesInputDdr1
     * @param coordScale1
     * @param coordinatesInputDdr2
     * @param coordScale2
     * @param coordinatesInputDdr3
     * @param coordScale3
     * @param weightsAddDdr
     * @param weightsScaleAdd
     * @param weightsMulDdr
     * @param weightsScaleMul
     * @param coordinatesOutputOcm
     * @param ocmMem
     */
    template <typename CoordinatesInputDdr0Tensor,
              FracRepType CoordinatesScale0FB,
              typename CoordinatesInputDdr1Tensor,
              FracRepType CoordinatesScale1FB,
              typename CoordinatesInputDdr2Tensor,
              FracRepType CoordinatesScale2FB,
              typename CoordinatesInputDdr3Tensor,
              FracRepType CoordinatesScale3FB,
              typename WeightsAddDdrTensor,
              FracRepType WeightsScaleAddFB,
              typename WeightsMulDdrTensor,
              FracRepType WeightsScaleMulFB,
              typename CoordinatesOutputOcmTensor,
              typename memAllocatorType>
    INLINE void ultrafaceBoundingBoxCoordinates(CoordinatesInputDdr0Tensor&              coordinatesInputDdr0,
                                                const FixedPoint32<CoordinatesScale0FB>& coordScale0,
                                                CoordinatesInputDdr1Tensor&              coordinatesInputDdr1,
                                                const FixedPoint32<CoordinatesScale1FB>& coordScale1,
                                                CoordinatesInputDdr2Tensor&              coordinatesInputDdr2,
                                                const FixedPoint32<CoordinatesScale2FB>& coordScale2,
                                                CoordinatesInputDdr3Tensor&              coordinatesInputDdr3,
                                                const FixedPoint32<CoordinatesScale3FB>& coordScale3,
                                                WeightsAddDdrTensor&                     weightsAddDdr,
                                                const FixedPoint32<WeightsScaleAddFB>&   weightsScaleAdd,
                                                WeightsMulDdrTensor&                     weightsMulDdr,
                                                const FixedPoint32<WeightsScaleMulFB>&   weightsScaleMul,
                                                CoordinatesOutputOcmTensor&              coordinatesOutputOcm,
                                                memAllocatorType&                        ocmMem) {
      using inpElemType               = typename CoordinatesInputDdr0Tensor::elemType;
      using elemType                  = typename CoordinatesOutputOcmTensor::elemType;
      constexpr std::int32_t numBoxes = CoordinatesOutputOcmTensor::NUM_COLS;

      using CoordinatesInputOcm0Tensor = OcmTensor<inpElemType, 1, 12, 30, 40>;
      using CoordinatesInputOcm1Tensor = OcmTensor<inpElemType, 1, 8, 15, 20>;
      using CoordinatesInputOcm2Tensor = OcmTensor<inpElemType, 1, 8, 8, 10>;
      using CoordinatesInputOcm3Tensor = OcmTensor<inpElemType, 1, 12, 4, 5>;
      using WeightsAddOcmTensor        = OcmTensor<inpElemType, 1, 1, numBoxes, 2>;
      using WeightsMulOcmTensor        = OcmTensor<inpElemType, 1, 1, numBoxes, 2>;

      WeightsAddOcmTensor weightsAddOcm;
      ocmMem.allocate(weightsAddOcm);
      memCpy(weightsAddDdr, weightsAddOcm);

      WeightsMulOcmTensor weightsMulOcm;
      ocmMem.allocate(weightsMulOcm);
      memCpy(weightsMulDdr, weightsMulOcm);

      // processing input 0
      std::int32_t               widthOffset = 0;
      CoordinatesInputOcm0Tensor coordinatesInputOcm0;
      ocmMem.allocate(coordinatesInputOcm0);
      memCpy(coordinatesInputDdr0, coordinatesInputOcm0);
      ultrafaceBoundingBoxCoordinatesSingleInput(coordinatesInputOcm0,
                                                 coordScale0,
                                                 weightsAddOcm,
                                                 weightsScaleAdd,
                                                 weightsMulOcm,
                                                 weightsScaleMul,
                                                 coordinatesOutputOcm,
                                                 widthOffset);
      ocmMem.free(coordinatesInputOcm0);

      // processing input 1
      widthOffset += (CoordinatesInputOcm0Tensor::NUM_CHN / 4) * CoordinatesInputOcm0Tensor::NUM_ROWS *
                     CoordinatesInputOcm0Tensor::NUM_COLS;
      CoordinatesInputOcm1Tensor coordinatesInputOcm1;
      ocmMem.allocate(coordinatesInputOcm1);
      memCpy(coordinatesInputDdr1, coordinatesInputOcm1);
      ultrafaceBoundingBoxCoordinatesSingleInput(coordinatesInputOcm1,
                                                 coordScale1,
                                                 weightsAddOcm,
                                                 weightsScaleAdd,
                                                 weightsMulOcm,
                                                 weightsScaleMul,
                                                 coordinatesOutputOcm,
                                                 widthOffset);
      ocmMem.free(coordinatesInputOcm1);

      // processing input 2
      widthOffset += (CoordinatesInputOcm1Tensor::NUM_CHN / 4) * CoordinatesInputOcm1Tensor::NUM_ROWS *
                     CoordinatesInputOcm1Tensor::NUM_COLS;
      CoordinatesInputOcm2Tensor coordinatesInputOcm2;
      ocmMem.allocate(coordinatesInputOcm2);
      memCpy(coordinatesInputDdr2, coordinatesInputOcm2);
      ultrafaceBoundingBoxCoordinatesSingleInput(coordinatesInputOcm2,
                                                 coordScale2,
                                                 weightsAddOcm,
                                                 weightsScaleAdd,
                                                 weightsMulOcm,
                                                 weightsScaleMul,
                                                 coordinatesOutputOcm,
                                                 widthOffset);
      ocmMem.free(coordinatesInputOcm2);

      // processing input 3
      widthOffset += (CoordinatesInputOcm2Tensor::NUM_CHN / 4) * CoordinatesInputOcm2Tensor::NUM_ROWS *
                     CoordinatesInputOcm2Tensor::NUM_COLS;
      CoordinatesInputOcm3Tensor coordinatesInputOcm3;
      ocmMem.allocate(coordinatesInputOcm3);
      memCpy(coordinatesInputDdr3, coordinatesInputOcm3);
      ultrafaceBoundingBoxCoordinatesSingleInput(coordinatesInputOcm3,
                                                 coordScale3,
                                                 weightsAddOcm,
                                                 weightsScaleAdd,
                                                 weightsMulOcm,
                                                 weightsScaleMul,
                                                 coordinatesOutputOcm,
                                                 widthOffset);
      ocmMem.free(coordinatesInputOcm3);
    }

    /**
     * @brief This is the custom op at end of ultraface for creating scores and coordinates for bounding
     * boxes.
     *
     * The general scheme involves processing scores and coordinates independently and then using a memcpy to do the
     * final concatenation in height. Scores and coordinates are calculated in a similar fashion. Each of the input
     * tensors can be processed one at a time. A input tensor is flown in with a square iterator such that channels
     * sit on the same core. This enables doing all the required compute within core (no data movements needed). Then,
     * the result is transferred to OCM via RAU. RAU takes care of the data transformations (reshape, concat, and
     * transpose).
     *
     * @tparam ScoresInputDdr0Tensor score input with shape (1, 6, 30, 40) and elemType is fixedpoint
     * @tparam ScoresInputDdr1Tensor score input with shape (1, 4, 15, 20) and elemType is fixedpoint
     * @tparam ScoresInputDdr2Tensor score input with shape (1, 4, 8, 10) and elemType is fixedpoint
     * @tparam ScoresInputDdr3Tensor score input with shape (1, 6, 4, 5) and elemType is fixedpoint
     * @tparam CoordinatesInputDdr0Tensor coordinates input with shape (1, 12, 30, 40) and elemType is fixedpoint
     * @tparam CoordinatesInputDdr1Tensor coordinates input with shape (1, 8, 15, 20) and elemType is fixedpoint
     * @tparam CoordinatesInputDdr2Tensor coordinates input with shape (1, 8, 8, 10) and elemType is fixedpoint
     * @tparam CoordinatesInputDdr3Tensor coordinates input with shape (1, 12, 4, 5) and elemType is fixedpoint
     * @tparam WeightsMulDdrTensor multiplication op weights with shape (1, 1, 4420, 2) and elemType is fixedpoint
     * @tparam WeightsAddDdrTensor addition op weights with shape (1, 1, 4420, 2) and elemType is fixedpoint
     * @tparam OutputDdrTensor output with shape (1, 1, 6, 4420) and elemType is fixedpoint. Note the height stores 6
     * elements ( = 2 scores + 4 coordinates)
     * @tparam ScoresScale0FB number of fractional bits for score tensor 0
     * @tparam ScoresScale1FB number of fractional bits for score tensor 1
     * @tparam ScoresScale2FB number of fractional bits for score tensor 2
     * @tparam ScoresScale3FB number of fractional bits for score tensor 3
     * @tparam CoordinatesScale0FB number of fractional bits for coordinate tensor 0
     * @tparam CoordinatesScale1FB number of fractional bits for coordinate tensor 1
     * @tparam CoordinatesScale2FB number of fractional bits for coordinate tensor 2
     * @tparam CoordinatesScale3FB number of fractional bits for coordinate tensor 3
     * @tparam WeightsScaleAddFB number of fractional bits for bias add weight
     * @tparam WeightsScaleMulFB number of fractional bits for bias mul weight
     * @param scoresInputDdr0 score input 0
     * @param scoresInputDdr1 score input 1
     * @param scoresInputDdr2 score input 2
     * @param scoresInputDdr3 score input 3
     * @param coordinatesInputDdr0 coordinate input 0
     * @param coordinatesInputDdr1 coordinate input 1
     * @param coordinatesInputDdr2 coordinate input 2
     * @param coordinatesInputDdr3 coordinate input 3
     * @param scoresScale0 scaling factor for score input 0
     * @param scoresScale1 scaling factor for score input 1
     * @param scoresScale2 scaling factor for score input 2
     * @param scoresScale3 scaling factor for score input 3
     * @param coordScale0 scaling factor for coordinate input 0
     * @param coordScale1 scaling factor for coordinate input 1
     * @param coordScale2 scaling factor for coordinate input 2
     * @param coordScale3 scaling factor for coordinate input 3
     * @param weightsAddDdr addition op weights
     * @param weightsScaleAdd scaling factor for add bias tensor
     * @param weightsMulDdr multiplication op weights
     * @param weightsScaleMul scaling factor for mul bias tensor
     * @param outputDdr output
     *
     */
    template <typename ScoresInputDdr0Tensor,
              typename ScoresInputDdr1Tensor,
              typename ScoresInputDdr2Tensor,
              typename ScoresInputDdr3Tensor,
              typename CoordinatesInputDdr0Tensor,
              typename CoordinatesInputDdr1Tensor,
              typename CoordinatesInputDdr2Tensor,
              typename CoordinatesInputDdr3Tensor,
              typename WeightsAddDdrTensor,
              typename WeightsMulDdrTensor,
              typename OutputDdrTensor,
              FracRepType ScoresScale0FB,
              FracRepType ScoresScale1FB,
              FracRepType ScoresScale2FB,
              FracRepType ScoresScale3FB,
              FracRepType CoordinatesScale0FB,
              FracRepType CoordinatesScale1FB,
              FracRepType CoordinatesScale2FB,
              FracRepType CoordinatesScale3FB,
              FracRepType WeightsScaleAddFB,
              FracRepType WeightsScaleMulFB,
              typename OcmAllocatorType>
    INLINE void ultrafaceBoundingBox(ScoresInputDdr0Tensor&                   scoresInputDdr0,
                                     ScoresInputDdr1Tensor&                   scoresInputDdr1,
                                     ScoresInputDdr2Tensor&                   scoresInputDdr2,
                                     ScoresInputDdr3Tensor&                   scoresInputDdr3,
                                     CoordinatesInputDdr0Tensor&              coordinatesInputDdr0,
                                     CoordinatesInputDdr1Tensor&              coordinatesInputDdr1,
                                     CoordinatesInputDdr2Tensor&              coordinatesInputDdr2,
                                     CoordinatesInputDdr3Tensor&              coordinatesInputDdr3,
                                     const FixedPoint32<ScoresScale0FB>&      scoresScale0,
                                     const FixedPoint32<ScoresScale1FB>&      scoresScale1,
                                     const FixedPoint32<ScoresScale2FB>&      scoresScale2,
                                     const FixedPoint32<ScoresScale3FB>&      scoresScale3,
                                     const FixedPoint32<CoordinatesScale0FB>& coordScale0,
                                     const FixedPoint32<CoordinatesScale1FB>& coordScale1,
                                     const FixedPoint32<CoordinatesScale2FB>& coordScale2,
                                     const FixedPoint32<CoordinatesScale3FB>& coordScale3,
                                     WeightsAddDdrTensor&                     weightsAddDdr,
                                     const FixedPoint32<WeightsScaleAddFB>&   weightsScaleAdd,
                                     WeightsMulDdrTensor&                     weightsMulDdr,
                                     const FixedPoint32<WeightsScaleMulFB>&   weightsScaleMul,
                                     OutputDdrTensor&                         outputDdr,
                                     OcmAllocatorType&                        ocmMem) {
      using elemType                  = typename OutputDdrTensor::elemType;
      constexpr std::int32_t numBoxes = OutputDdrTensor::NUM_COLS;

      using ScoresOutputOcmTensor = OcmTensor<elemType, 1, 1, 2, numBoxes>;
      ScoresOutputOcmTensor scoresOutputOcm;
      ocmMem.allocate(scoresOutputOcm);
      using CoordinatesOutputOcmTensor = OcmTensor<elemType, 1, 1, 4, numBoxes>;
      CoordinatesOutputOcmTensor coordinatesOutputOcm;
      ocmMem.allocate(coordinatesOutputOcm);

      ultrafaceBoundingBoxScores(scoresInputDdr0,
                                 scoresScale0,
                                 scoresInputDdr1,
                                 scoresScale1,
                                 scoresInputDdr2,
                                 scoresScale2,
                                 scoresInputDdr3,
                                 scoresScale3,
                                 scoresOutputOcm,
                                 ocmMem);
      memCpy(scoresOutputOcm, outputDdr);
      ultrafaceBoundingBoxCoordinates(coordinatesInputDdr0,
                                      coordScale0,
                                      coordinatesInputDdr1,
                                      coordScale1,
                                      coordinatesInputDdr2,
                                      coordScale2,
                                      coordinatesInputDdr3,
                                      coordScale3,
                                      weightsAddDdr,
                                      weightsScaleAdd,
                                      weightsMulDdr,
                                      weightsScaleMul,
                                      coordinatesOutputOcm,
                                      ocmMem);
      memCpy(coordinatesOutputOcm, outputDdr, 0, 0, 2, 0);
    }
  }  // namespace usercustom
}  // namespace chimera

4. Boxes on the ISS against ONNX Runtime

Loads face images from common/calibration/face with the model's preprocessing (320 by 240, mean and std 0.5). run_ultraface runs one image through ONNX Runtime and through the compiled model on the ISS, applies the NMS node to each output (the CCL NMS to the ISS output, the CPU NMS to the ONNX Runtime output) and computes, for every reference box, the best IoU against the ISS boxes; the mean of those is the image's score. visualize draws both sets of boxes. The last lines print the mean IoU per image and over all images; the assertion requires the overall mean to be at least 0.8 (measured 0.868 over these eight images).

%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import yaml
from PIL import Image

import sdk_cli.node_builtins.classical.nms as nms_node
import sdk_cli.node_builtins.utils as node_utils
from sdk_cli.node_builtins.classical.nms import box_utils, execute_node, execute_node_ccl
from sdk_cli.utils import model_helpers
from sdk_cli.visualizers import nms

dataset_mean = [0.5, 0.5, 0.5]
dataset_std = [0.5, 0.5, 0.5]
dataset_input_size = (320, 240)
classes = [""]  # one class: face
mh = model_helpers.ModelHelper(dataset_input_size, dataset_mean, dataset_std)
THREADS = 6
allimages = mh.get_images(str(example_path("common/calibration/face")), THREADS * 2)

with (Path(nms_node.__file__).parent / "nms.yaml").open("r") as stream:
    config = yaml.safe_load(stream)
properties = {
    key: value["value"] for key, value in config["properties"].items() if "value" in value
}
hw_config = node_utils.EXAMPLE_KWARGS["hardware_config"]
nmsVis = nms.NMSVisualizer()


def run_ultraface(image_p):
    image = mh.load_image(Image.open(image_p))
    ort_output = onnx_session.run([], {"input": image})[0][0]
    iss_output = cgc_job.run_inference_harness(inputs={"input": image})["concat_output_1"]

    config["inputs"]["input"]["value"] = iss_output
    result_ccl = execute_node_ccl(
        config["inputs"], properties, spec=config, hardware_config=hw_config, quiet=True
    )
    config["inputs"]["input"]["value"] = ort_output
    result_cpu = execute_node(config["inputs"], properties, spec=config, hardware_config=hw_config)

    cpu_boxes = result_cpu["boxes"]
    ccl_boxes = result_ccl["boxes"]
    iou_matrix = np.zeros((len(cpu_boxes), len(ccl_boxes)))
    for i, cpu_box in enumerate(cpu_boxes):
        for j, ccl_box in enumerate(ccl_boxes):
            iou_matrix[i][j] = box_utils.iou_of(cpu_box, ccl_box)
    return {
        "result": result_cpu,
        "result_ccl": result_ccl,
        "image": image,
        "mean_iou": float(iou_matrix.max(axis=1).mean()),
        "class_names": classes,
    }


def visualize(nn_output):
    chimera_image = nmsVis.draw_boxes(
        nn_output["result_ccl"], nn_output["image"], nn_output["class_names"], line_width=2
    )
    cpu_image = nmsVis.draw_boxes(
        nn_output["result"], nn_output["image"], nn_output["class_names"], line_width=2
    )
    plt.figure(figsize=(10, 5))
    plt.subplot(1, 2, 1)
    plt.imshow(chimera_image)
    plt.title("Chimera")
    plt.axis("off")
    plt.subplot(1, 2, 2)
    plt.imshow(cpu_image)
    plt.title("CPU (ONNX Runtime)")
    plt.axis("off")
    plt.suptitle(f"Mean (CPU vs Chimera) IoU: {nn_output['mean_iou']:.2f}")
    plt.tight_layout()
    plt.show()


mean_ious = []
for image in allimages:
    out = run_ultraface(image)
    visualize(out)
    mean_ious.append(out["mean_iou"])
    print(f"{Path(image).name}: mean IoU {out['mean_iou']:.3f}")
print(f"mean IoU over {len(mean_ious)} images: {np.mean(mean_ious):.3f}")
assert (
    np.mean(mean_ious) >= 0.8
), f"ISS boxes drifted from ONNX Runtime: mean IoU {np.mean(mean_ious):.3f}"
2026-10-23 00:52 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2e0248d00>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:04<00:00,  3.08it/s]
2026-10-23 00:52 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2dfdda3b0>
2026-10-23 00:52 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:52 - INFO - epu - iss_testing - Done 0:00:00.137262


[SDK-CLI] : Compiling source


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /quadric/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /quadric/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:52 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:52 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

daniel_maverick.png: mean IoU 0.885


2026-10-23 00:52 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2dfdb3550>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:07<00:00,  2.03it/s]
2026-10-23 00:52 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2ceff6fb0>
2026-10-23 00:52 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:52 - INFO - epu - iss_testing - Done 0:00:00.145136


[SDK-CLI] : Compiling source


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:52 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:52 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:52 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

sales_squad_jani.jpg: mean IoU 0.805


2026-10-23 00:52 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2ceff5f00>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:07<00:00,  1.91it/s]
2026-10-23 00:53 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d0766dd0>
2026-10-23 00:53 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:53 - INFO - epu - iss_testing - Done 0:00:00.110537


[SDK-CLI] : Compiling source


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: make -j8


[ 50%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:53 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:53 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

nigel_veer.jpg: mean IoU 0.849


2026-10-23 00:53 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2dfe94970>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:04<00:00,  3.43it/s]
2026-10-23 00:53 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d07d5420>
2026-10-23 00:53 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:53 - INFO - epu - iss_testing - Done 0:00:00.075564


[SDK-CLI] : Compiling source


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:53 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:53 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

veer_daniel.jpg: mean IoU 0.894


2026-10-23 00:53 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2dfdb2c80>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:09<00:00,  1.60it/s]
2026-10-23 00:53 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d0666fb0>
2026-10-23 00:53 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:53 - INFO - epu - iss_testing - Done 0:00:00.181134


[SDK-CLI] : Compiling source


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:53 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
nms_epu_epu: EPU opt stage
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:54 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:54 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

veer_daniel_prejapan23.jpg: mean IoU 0.870


2026-10-23 00:54 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2dfdb2c80>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:07<00:00,  2.11it/s]
2026-10-23 00:54 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d0706fe0>
2026-10-23 00:54 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:54 - INFO - epu - iss_testing - Done 0:00:00.193289


[SDK-CLI] : Compiling source


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:54 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:54 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

nvd.jpg: mean IoU 0.857


2026-10-23 00:54 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d05534f0>
FILM 15/15: 100%|███████████████████████████████████████████████████| 15/15 [00:07<00:00,  1.95it/s]
2026-10-23 00:54 - INFO - epu - iss_testing - No tranges found for input, use default float range: <tvm.contrib.epu.interval.Interval object at 0x78c2d05670d0>
2026-10-23 00:54 - INFO - epu - iss_testing - Started Executing Onnxruntime...
2026-10-23 00:54 - INFO - epu - iss_testing - Done 0:00:00.112203


[SDK-CLI] : Compiling source


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: cmake CMakeLists.txt -B /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build -DNUM_GPNPUS=1 -DNUM_CORES=32 -DNUM_BORDERS=2 -DEPU_VERSION=2.0.0 -DQLLVM_ROOT_PATH=/quadric/llvm -DOCM_SIZE_KIBIBYTES=16384 -DNUM_PE_MACS=16 -DASSERT_MLS_WIDTH_LINE_ALIGN=ON -DSTACKOVERFLOW_ERROR=OFF -DHARDWARE_TARGET=OFF -DELS_AXI_WIDTH_BITS=1024 -DELS_RD_BW_MBPS=1048576 -DELS_WR_BW_MBPS=1048576 -DCYCLE_TIME_NS=0.5882352941176471 


CMAKE_CXX_COMPILER: /quadric/llvm/bin/clang++
-- EPU toolchain: LLVM 8 (/quadric/llvm)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/build


2026-10-23 00:54 - DEBUG - sdk - cli - Executing command: make -j8


[ 25%] Building CXX object CMakeFiles/nms_epu_epu.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
[ 50%] Building CXX object CMakeFiles/nms_epu_host.dir/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp.o
clang-8: warning: /quadric/llvm/bin/clang++: 'linker' input unused [-Wunused-command-line-argument]
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
/quadric/sdk-cli/sdk_cli/node_builtins/classical/nms/nms_epu.cpp:168:21: warning: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' is deprecated: Deprecated as of 2026-08-06: Use the nmsIou overload taking container::NDArray arguments instead.. This function will be removed in 26.10. [-Wdeprecated-declarations]
    qVboxCount[0] = nmsIou<OcmValidBoxShape, boxCacheSize>(
                    ^
/quadric/sdk_install/src/nms.hpp:299:3: note: 'nmsIou<chimera::RootTensor<0, 0, 0, 0, chimera::FixedPoint<int, '\x0E', '\x04', 0>, unsigned int, 128, chimera::TensorLocation::OCM, 1, 1, 4, 160>, 128, '\x0E', '\t'>' has been explicitly marked deprecated here
  QUADRIC_DEPRECATED_FUNCTION("Use the nmsIou overload taking container::NDArray arguments instead.",
  ^
/quadric/sdk_install/src/core/epu_common.hpp:219:5: note: expanded from macro 'QUADRIC_DEPRECATED_FUNCTION'
  [[deprecated("Deprecated as of " deprecation_date ": " reason ". This function will be removed in " removal_target \
    ^
1 warning generated.
[ 75%] Linking EPU executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_epu.s
nms_epu_epu: EPU opt stage
nms_epu_epu: EPU .s to elf
[ 75%] Built target nms_epu_epu
1 warning generated.
[100%] Linking CXX executable /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output/nms_epu_host
[100%] Built target nms_epu_host
[SDK-CLI] : Compilation done. Output: /quadric/sdk-cli/examples/custom_op/nms_epu_QC-U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/output
[SDK-CLI] : Executing on QC-U simulator


2026-10-23 00:55 - DEBUG - sdk - cli - Executing command: ./nms_epu_host -c --ddrRdBwTotal 1048576.0 --ddrWrBwTotal 1048576.0 --ddrAxiWidth 1024 --instMemDepth 1310720 --ocmSize 16777216 --cycleTimeNS 0.5882352941176471 --no-check --ddrRdAvgPct 100 --ddrRdMaxPct 100 --ddrWrAvgPct 100 --ddrWrMaxPct 100 --postKernelFlowTimeoutCycles 4000000 --clusterSize 1 --numClusters 1 
2026-10-23 00:55 - WARNING - epu - core - No profile.json found. Not able to show performance results.
2026-10-23 00:55 - INFO - epu - core - If you would like to see performance results, add profiling statements to your source code.


[SDK-CLI] : Execution completed.

nigel_daniel.jpg: mean IoU 0.922
mean IoU over 7 images: 0.869

5. Profile

Prints the job summary (cycles per region, memory traffic) and plots the run statistics of the last ISS run.

print(cgc_job)
cgc_job.plot_run_statistics()
╒═════════════════════╤═══════════════════════════════════════════════════════════════════════════════════╕
│ Module Name         │ ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1                 │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ ONNX File           │ /quadric/sdk-cli/examples/custom_op/_plugin_out_ultraface/ultraface_quant_v2.onnx │
├─────────────────────┼───────────────────────────────────────────────────────────────────────────────────┤
│ Custom Ops          │ /quadric/sdk-cli/examples/custom_op/_plugin_out_ultraface/custom_ops.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.000 │
╘════╧════════╧═════════════════╧══════════════════╧══════════════════════════╧═══════╛

Post-ISS Report 1.7 GHz ***
Fully placed-and-routed gate simulation: 
╒══════════════════════════════════╤═════════╕
│ Latency (ms)                     │ 0.21    │
├──────────────────────────────────┼─────────┤
│ FPS                              │ 4831.96 │
├──────────────────────────────────┼─────────┤
│ Average Power @ 3nm SSGNP (mW)   │ 2205.42 │
├──────────────────────────────────┼─────────┤
│ FPS per Watt @ 3nm SSGNP (FPS/W) │ 2190.95 │
├──────────────────────────────────┼─────────┤
│ Ext Rd Bytes (MB)                │ 1.31    │
├──────────────────────────────────┼─────────┤
│ Ext Wr Bytes (MB)                │ 0.13    │
├──────────────────────────────────┼─────────┤
│ Avg Ext Rd BW (GBps)             │ 6.20    │
├──────────────────────────────────┼─────────┤
│ Avg Ext Wr BW (GBps)             │ 0.60    │
├──────────────────────────────────┼─────────┤
│ MAC Utilization                  │ 1.74%   │
╘══════════════════════════════════╧═════════╛
*** Data generated using 7nm SSGNP gatesim and scaled to 3nm

[SDK-CLI] : TotalCycles: 351,824
[SDK-CLI] : Executions/second: 4,831.96

compute      : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 149.504K
data_array   : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 48.554K
mac          : ▇▇▇▇▇▇▇▇▇▇▇▇ 36.838K
data_external: ▇▇▇▇ 12.399K
data_ocm     : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 104.424K

for more information check run directory: /quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20261023_005442_5b2355


2026-10-23 00:55 - INFO - epu - chimera_job - Combined plots generated and saved to: 
/quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20261023_005442_5b2355/data/ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1.combined.png





'/quadric/sdk-cli/examples/custom_op/ccl_build/ultraface_quant_v2_QC_U_1d7_16MB_4kB_128GBps_128GBps_16_OFF_x1_x1/run/20261023_005442_5b2355/data'

Sign in to your account

Don't have an account? 
By signing in, you are agreeing to our Terms of Use and Privacy Policy.
Quadric // One architecture. Every algorithm.

Develop.

Simulate.

Profile.

Collaborate.