Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13856: update gelu_bw op documentation on bfloat8_b limitations #17407

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ void bind_binary_backward_bias_gelu(
const std::string& parameter_b_doc,
string parameter_b_value,
const std::string& description,
const std::string& supported_dtype = "BFLOAT16") {
const std::string& supported_dtype = "BFLOAT16",
const std::string_view note = "") {
auto doc = fmt::format(
R"doc(

Expand Down Expand Up @@ -345,6 +346,8 @@ void bind_binary_backward_bias_gelu(

bfloat8_b/bfloat4_b is only supported on TILE_LAYOUT

{9}

Example:

>>> grad_tensor = ttnn.from_torch(torch.tensor([[1, 2], [3, 4]], dtype=torch.bfloat16), layout=ttnn.TILE_LAYOUT, device=device)
Expand All @@ -361,7 +364,8 @@ void bind_binary_backward_bias_gelu(
parameter_b_doc,
parameter_b_value,
description,
supported_dtype);
supported_dtype,
note);

bind_registered_operation(
module,
Expand Down Expand Up @@ -1317,7 +1321,8 @@ void py_module(py::module& module) {
"none",
R"doc(Performs backward operations for bias_gelu on :attr:`input_tensor_a` and :attr:`input_tensor_b` or :attr:`input_tensor` and :attr:`bias`, with given :attr:`grad_tensor` using given :attr:`approximate` mode.
:attr:`approximate` mode can be 'none', 'tanh'.)doc",
R"doc(BFLOAT16, BFLOAT8_B)doc");
R"doc(BFLOAT16)doc",
R"doc(For more details about BFLOAT8_B, refer to the `BFLOAT8_B limitations <../tensor.html#limitation-of-bfloat8-b>`_.)doc");
}

} // namespace binary_backward
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,9 @@ void py_module(py::module& module) {
"Approximation type",
"none",
R"doc(Performs backward operations for gelu on :attr:`input_tensor`, with given :attr:`grad_tensor` using given :attr:`approximate` mode.
:attr:`approximate` mode can be 'none', 'tanh'.)doc");
:attr:`approximate` mode can be 'none', 'tanh'.)doc",
R"doc(BFLOAT16)doc",
R"doc(For more details about BFLOAT8_B, refer to the `BFLOAT8_B limitations <../tensor.html#limitation-of-bfloat8-b>`_.)doc");

detail::bind_unary_backward_unary_optional_float(
module,
Expand Down
Loading