patrykorwat fec2a1c73a axelera: cut hot-path allocations in preprocess and dequantise
Preprocess reused three fresh arrays per frame (resize output, quantised
copy, strided channel flip at write time) and refilled the whole padded
input buffer. Now resize writes into a scratch with cv2 dst=, the BGR->RGB
swap is a cvtColor into scratch (no strided copy), the int8 quantise runs
with out=, and only the border strips the content rect does not cover get
memset. Measured 39% faster on the 704x576 -> 640x640 path.

Dequantise allocated two fp32 temporaries per head (astype then the
dequant expression) before the transpose copy. copyto now casts int8->fp32
while transposing straight into a reused fp32 feed buffer, and the zp/scale
math runs in place. Measured 78% faster for the YOLOX-S head set, outputs
bit-identical (int8->fp32 cast is lossless).

Argmax+gather replaces max+argmax (one class-axis reduction instead of
two), and the postprocess session pins intra_op_num_threads=1: one frame
is in flight through the decoder, extra ORT threads only add context
switches.
2026-09-03 20:28:45 +00:00
..
2026-08-27 20:30:35 -05:00
2026-08-27 20:30:35 -05:00
2026-08-27 20:30:35 -05:00
2026-07-06 12:28:02 -05:00
2026-08-27 20:30:35 -05:00
2026-07-06 12:28:02 -05:00
2026-08-27 20:30:35 -05:00
2026-07-06 12:28:02 -05:00
…
2026-07-06 12:28:02 -05:00
2026-07-06 12:28:02 -05:00