[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()) input_tensor = input_tensor.redistribute(ReplicaSpec())
output = F.layer_norm(input_tensor, normalized_shape, weight=weight, bias=bias, eps=eps) output = F.layer_norm(input_tensor, normalized_shape, weight=weight, bias=bias, eps=eps)
output = ColoTensor.from_torch_tensor( output = ColoTensor.from_torch_tensor(tensor=output,
tensor=output, spec=ColoTensorSpec(pg=input_tensor.get_process_group(),
spec=ColoTensorSpec( dist_attr=input_tensor.dist_spec))
pg=input_tensor.get_process_group(),
dist_attr=input_tensor.dist_spec))
return output return output

Loading…
Cancel
Save