mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-08 04:24:47 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import torch
|
||||
from torch import Tensor
|
||||
|
||||
|
||||
def bias_dropout_add(x, bias, residual, prob, training):
|
||||
@@ -10,16 +9,14 @@ def bias_dropout_add(x, bias, residual, prob, training):
|
||||
|
||||
|
||||
@torch.jit.script
|
||||
def bias_dropout_add_fused_train(x: torch.Tensor,
|
||||
bias: torch.Tensor,
|
||||
residual: torch.Tensor,
|
||||
prob: float) -> torch.Tensor:
|
||||
def bias_dropout_add_fused_train(
|
||||
x: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor, prob: float
|
||||
) -> torch.Tensor:
|
||||
return bias_dropout_add(x, bias, residual, prob, True)
|
||||
|
||||
|
||||
@torch.jit.script
|
||||
def bias_dropout_add_fused_inference(x: torch.Tensor,
|
||||
bias: torch.Tensor,
|
||||
residual: torch.Tensor,
|
||||
prob: float) -> torch.Tensor:
|
||||
def bias_dropout_add_fused_inference(
|
||||
x: torch.Tensor, bias: torch.Tensor, residual: torch.Tensor, prob: float
|
||||
) -> torch.Tensor:
|
||||
return bias_dropout_add(x, bias, residual, prob, False)
|
||||
|
Reference in New Issue
Block a user