IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo module

roi_align_gpu

Implements the GPU RoI Align kernel.

Each output element output[ri, ph, pw, c] is the pooled value of the roi_bin_grid_h x roi_bin_grid_w bilinearly-sampled points inside the region's bin. The kernel assigns one thread per output element: the thread recomputes the region's bin geometry (cheap integer/float arithmetic on the ROI row) and accumulates the four bilinear corner contributions. This mirrors the CPU roi_align_nhwc loop; the two agree within float32 rounding tolerance (the GPU compiler may reorder/contract the same operations).

Functionsโ€‹

Was this page helpful?