Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def forward(ctx, x, w):
@staticmethod
@torch.cuda.amp.custom_bwd
def backward(ctx, grad):
grad = grad.contiguous()
x, w = ctx.saved_tensors
dx = _extension.backward_data_fp32(grad, w)
dw = _extension.backward_filter_fp32(grad, x, w)
Expand All @@ -37,6 +38,7 @@ def forward(ctx, x, w):
@staticmethod
@torch.cuda.amp.custom_bwd
def backward(ctx, grad):
grad = grad.contiguous()
x, w = ctx.saved_tensors
dx = _extension.backward_data_fp16(grad, w)
dw = _extension.backward_filter_fp16(grad, x, w)
Expand Down