torch.nn.functional.scaled_addmm_#
- torch.nn.functional.scaled_addmm_(input, mat1, mat2, scale_a, scale_recipe_a, scale_b, scale_recipe_b, swizzle_a=None, swizzle_b=None, contraction_dim=(), use_fast_accum=False, *, beta=1.0, alpha=1.0)[source]#
In-place version of
scaled_addmm().This function accumulates in
input.dtype(float16,bfloat16, orfloat32), preserves the storage ofinput, and returnsinput. A serialized WGRAD loop can create the first contribution withscaled_mm(), then usescaled_addmm_for later contributions.Warning
In-place accumulation is not safe for concurrent writers. Callers must serialize writes or provide external coordination.
- Return type: