Skip to content

Commit 269da81

Browse files
authored
Merge pull request #49 from tensara/gelu-bug
gelu-bug
2 parents 2d66f38 + cc7f898 commit 269da81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

problems/gelu/def.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def reference_solution(self, input_matrix: torch.Tensor) -> torch.Tensor:
2626
Result of GELU activation
2727
"""
2828
with torch.no_grad(), torch.autocast("cuda", enabled=False, dtype=input_matrix.dtype):
29-
return torch.nn.functional.gelu(input_matrix)
29+
return torch.nn.functional.gelu(input_matrix, approximate="tanh")
3030

3131
def generate_test_cases(self, dtype: torch.dtype) -> List[Dict[str, Any]]:
3232
"""

0 commit comments

Comments
 (0)