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 struct
Conv2dResidualAdd
struct Conv2dResidualAdd
Fused conv2d + TMA residual add + bias for SM100 (Blackwell).
Computes: D = Conv(input, filter) + bias + source The residual (source) is loaded via TMA pre-fetch overlapped with MMA, and the bias is applied in the epilogue.
This op is intended for ResNet-style skip connections where a residual tensor is added to the convolution output.
Implemented traitsβ
AnyType,
ImplicitlyDestructible
Methodsβ
executeβ
static def execute[stride_h: Int, stride_w: Int, pad_top: Int, pad_bottom: Int, pad_left: Int, pad_right: Int, has_bias: Bool, target: StringSlice[StaticConstantOrigin]](output: ManagedTensorSlice[FusedOutput, static_spec=output.static_spec], input: ManagedTensorSlice[Input, static_spec=input.static_spec], filter: ManagedTensorSlice[Input, static_spec=filter.static_spec], source: ManagedTensorSlice[Input, static_spec=source.static_spec], bias: ManagedTensorSlice[Input, static_spec=bias.static_spec], ctx: DeviceContext)
shapeβ
static def shape(input: ManagedTensorSlice[Input, static_spec=input.static_spec], filter: ManagedTensorSlice[Input, static_spec=filter.static_spec], source: ManagedTensorSlice[Input, static_spec=source.static_spec], bias: ManagedTensorSlice[Input, static_spec=bias.static_spec]) -> IndexList[4]
Returns:
IndexList[4]
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!