For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
conv3d_gpu_naive_ndhwc_qrscf
def conv3d_gpu_naive_ndhwc_qrscf[input_layout: Layout, filter_layout: Layout, output_layout: Layout, input_type: DType, filter_type: DType, output_type: DType, block_size: Int, maybe_epilogue_func: Optional[def[dtype: DType, rank: Int, width: SIMDLength, alignment: Int = Int(1)](IndexList[rank], SIMD[dtype, width]) capturing thin -> None]](input: LayoutTensor[input_type, input_layout, MutAnyOrigin], filter: LayoutTensor[filter_type, filter_layout, MutAnyOrigin], output: LayoutTensor[output_type, output_layout, MutAnyOrigin], stride: IndexList[Int(3)], dilation: IndexList[Int(3)], padding: IndexList[Int(3)], num_groups: Int)
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 (
Layout): Memory layout of the input tensor (NDHWC). - βfilter_layout (
Layout): Memory layout of the filter tensor (QRSCF). - βoutput_layout (
Layout): 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, rank: Int, width: SIMDLength, alignment: Int = Int(1)](IndexList[rank], SIMD[dtype, width]) capturing thin -> None]): Optional elementwise SIMD epilogue applied to each computed output value in place of a direct store.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!