Skip to content

hexagon: extend conv2d to conv3d - #12

Closed
Mark Todorovich (marktodorovich) wants to merge 3 commits into
masterfrom
mtodorov/hexagon-conv3d
Closed

Mark Todorovich (marktodorovich) wants to merge 3 commits into
masterfrom
mtodorov/hexagon-conv3d

Conversation

@marktodorovich

@marktodorovich Mark Todorovich (marktodorovich) commented Oct 31, 2026 •

Copy link
Copy Markdown

Overview

Generalization of HTP CONV_2D implementation to support CONV_3D

Additional information

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Yes, creating first cut implementation

Max Krasnyansky (@max-krasnyansky)

- New op HTP_OP_CONV_3D is wired through htp-ops.h, main.c (shares op_conv_2d) and the op remap in htp-kparams.cpp.
- conv_3d runs on the existing HMX tiled (implicit GEMM) conv2d path. KD and KH are folded into one virtual kernel row (KD*KH), and output rows are counted as N*OD*OH.
- htp_kparams_solve_conv3d checks the conv_3d layout and calls the tiled solver htp_kparams_conv2d_tiled, which takes an is3d flag.
- The tiled kernel takes the sizes and strides that differ between conv_2d and conv_3d from a struct htp_conv_geom. Only the input stage unfolds depth.
- 256-entry DMA queue can no longer overflow

Assisted-by: Claude Code
The KH and OH fastdiv values used to unfold conv_3d kh into (kd, kh) and
oh into (od, oh) were built per op on the device, each with a 64-bit
divide. Pass them in the kernel params instead; they fit in the space the
window variant already reserves, so the struct size does not change.

Assisted-by: Claude Code
@marktodorovich
Mark Todorovich (marktodorovich) changed the base branch from mtodorov/hexagon-fix-large-dma-stride to master November 5, 2026 19:43
@marktodorovich Mark Todorovich (marktodorovich) changed the title Mtodorov/hexagon conv3d hexagon: extend conv2d to conv3d Nov 5, 2026
@marktodorovich Mark Todorovich (marktodorovich) removed the documentation Improvements or additions to documentation label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants