Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6445b06

Browse files
authored
Update test_fast_layer_norm.py (#1911)
1 parent e74a67b commit 6445b06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apex/contrib/test/layer_norm/test_fast_layer_norm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _test_impl(S, B, hidden_size, itype, wtype, ctype=fp32, mem_eff=False):
188188
print(f"db: relerr={re_db:.4e} mse={mse_db:.4e}")
189189

190190
def check_err(x, relerr):
191-
tol = 2e-2 if x.dtype in (torch.float16, torch.bfloat16) else 5e-6
191+
tol = 2e-2 if x.dtype in (torch.float16, torch.bfloat16) else 1e-5
192192
return relerr < tol
193193

194194
return [

0 commit comments

Comments
 (0)