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 function
conv3d_gpu_naive_ndhwc_qrscf
def conv3d_gpu_naive_ndhwc_qrscf[input_layout: TensorLayout, filter_layout: TensorLayout, output_layout: TensorLayout, input_type: DType, filter_type: DType, output_type: DType, block_size: Int, maybe_epilogue_func: Optional[def[dtype: DType, width: SIMDLength, alignment: Int = Int(1)](Coord[*?], SIMD[dtype, width]) capturing thin -> None], InputEngine: TensorEngine, FilterEngine: TensorEngine, OutputEngine: TensorEngine](input: TileTensor[input_type, input_layout, MutAnyOrigin, Engine=InputEngine], filter: TileTensor[filter_type, filter_layout, MutAnyOrigin, Engine=FilterEngine], output: TileTensor[output_type, output_layout, MutAnyOrigin, Engine=OutputEngine], stride: IndexList[Int(3)], dilation: IndexList[Int(3)], padding: IndexList[Int(3)], num_groups: Int32)
Naive GPU kernel for 3D NDHWC convolution with QRSCF filter layout.
Each thread computes one output voxel across all output channels, iterating over the Q x R x S filter window with vectorized input loads and scalar filter accumulation.
Arguments:
input: Input activation tensor in NDHWC layout.
filter: Convolution weight tensor in QRSCF layout.
output: Output activation tensor in NDHWC layout.
stride: Per-spatial-axis convolution stride as (depth, height, width).
dilation: Per-spatial-axis filter dilation as (depth, height, width).
padding: Per-spatial-axis symmetric padding as (depth, height, width).
num_groups: Number of convolution groups for grouped convolution.
Parameters:
- input_layout (
TensorLayout): Memory layout of the input tensor (NDHWC). - filter_layout (
TensorLayout): Memory layout of the filter tensor (QRSCF). - output_layout (
TensorLayout): Memory layout of the output tensor (NDHWC). - input_type (
DType): Element type of the input tensor. - filter_type (
DType): Element type of the filter tensor. - output_type (
DType): Element type of the output tensor. - block_size (
Int): Thread block size used for bothxandyblock dimensions. - maybe_epilogue_func (
Optional[def[dtype: DType, width: SIMDLength, alignment: Int = Int(1)](Coord[*?], SIMD[dtype, width]) capturing thin -> None]): Optional elementwise SIMD epilogue applied to each computed output value in place of a direct store. - InputEngine (
TensorEngine): Storage engine of the input tensor. - FilterEngine (
TensorEngine): Storage engine of the filter tensor. - OutputEngine (
TensorEngine): Storage engine of the output tensor.