Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit fe89b3b

Browse files
committed
lint fixes
1 parent 3d709db commit fe89b3b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

metaseq/model_parallel/modules/sequence_parallel_transformer_layer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
)
3131
from megatron.mpu.utils import split_tensor_along_last_dim
3232
from megatron.model.fused_softmax import scaled_upper_triang_masked_softmax_cuda
33-
from megatron.mpu import get_tensor_model_parallel_world_size
3433

3534
has_megatron_submodule = True
3635
except (ImportError, ModuleNotFoundError):
@@ -434,7 +433,7 @@ def backward(ctx, grad_output):
434433
if xf_eff_attn:
435434
grad_out_proj_input = grad_out_proj_input.reshape(
436435
seq_len, bsz, -1, head_dim
437-
).transpose(0,1)
436+
).transpose(0, 1)
438437
d_q, d_k, d_v = xops.memory_efficient_attention_backward(
439438
grad=grad_out_proj_input,
440439
output=out,
@@ -457,7 +456,6 @@ def backward(ctx, grad_output):
457456
grad_out_proj_input, q, k, v, attn_probs, seq_len, bsz, head_dim
458457
)
459458

460-
461459
(
462460
mha_layer_norm_output,
463461
mha_layer_norm_mean,

0 commit comments

Comments
 (0)