[NFC] polish colossalai/nn/_ops/embedding.py code style (#1561)

This commit is contained in:
BigOneLiXiaoMing 2022-09-08 16:02:44 +08:00 committed by Frank Lee
parent 08815f0e72
commit 0c4c9aa6e0

View File

@ -113,8 +113,7 @@ def colo_embedding(input_tensor: GeneralTensor,
if not weight.has_compute_spec(): # No Model Parallel Applied
assert weight.is_replicate(), 'Invalid weight spec for native embedding op'
return ColoTensor.from_torch_tensor(
tensor=F.embedding(input_tensor,
return ColoTensor.from_torch_tensor(tensor=F.embedding(input_tensor,
weight,
padding_idx=padding_idx,
max_norm=max_norm,