[NFC] polish colossalai/nn/_ops/layernorm.py code style (#1555)

pull/1550/head
yuxuan-lou 2 years ago committed by Frank Lee
parent 8edb777cc2
commit 413f9c19f4

@ -19,9 +19,7 @@ def colo_layernorm(
input_tensor = input_tensor.redistribute(ReplicaSpec())
output = F.layer_norm(input_tensor, normalized_shape, weight=weight, bias=bias, eps=eps)
output = ColoTensor.from_torch_tensor(
tensor=output,
spec=ColoTensorSpec(
pg=input_tensor.get_process_group(),
dist_attr=input_tensor.dist_spec))
output = ColoTensor.from_torch_tensor(tensor=output,
spec=ColoTensorSpec(pg=input_tensor.get_process_group(),
dist_attr=input_tensor.dist_spec))
return output

Loading…
Cancel
Save