Skip to content

Commit

Permalink
Fix incorrect dtype in LayerNormLinear (#483)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Moon <[email protected]>
Co-authored-by: Kirthi Shankar Sivamani <[email protected]>
  • Loading branch information
timmoon10 and ksivaman authored Oct 20, 2023
1 parent d097883 commit 1afb625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transformer_engine/pytorch/module/layernorm_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def forward(
ub_obj_lnout = get_ub("qkv_fprop")
ln_out = ub_obj_lnout.get_ubuf_output(0)
else:
ln_out_dtype = torch.uint8 if fp8 else inputmat.dtype
ln_out_dtype = torch.uint8 if (fp8 and not return_layernorm_output) else inputmat.dtype
ln_out = torch.empty_like(inputmat, dtype=ln_out_dtype)
if ub_atomic_gemm_ag:
assert fp8, "AtomicGemm overlap supported only for FP8 GEMM."
Expand Down

0 comments on commit 1afb625

Please sign in to comment.