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

#8144: Fix ttnn logical_not doc #8352

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions docs/source/ttnn/ttnn/ttnn/logical_not.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _ttnn.logical_not:

ttnn.logical_not
######################
logical_not
#################

.. autofunction:: ttnn.logical_not
16 changes: 13 additions & 3 deletions tests/ttnn/sweep_tests/sweeps/logical_not.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,24 @@
"batch_sizes": [(1,)],
"height": [384, 1024],
"width": [1024, 4096],
"input_dtype": [ttnn.bfloat16],
"input_dtype": [ttnn.bfloat16, ttnn.bfloat8_b],
"input_memory_config": [ttnn.DRAM_MEMORY_CONFIG],
"output_memory_config": [ttnn.DRAM_MEMORY_CONFIG],
"layout": [ttnn.TILE_LAYOUT],
"layout": [ttnn.TILE_LAYOUT, ttnn.ROW_MAJOR_LAYOUT],
}


def skip(**_) -> Tuple[bool, Optional[str]]:
def skip(
batch_sizes,
height,
width,
input_dtype,
input_memory_config,
output_memory_config,
layout,
) -> Tuple[bool, Optional[str]]:
if input_dtype == ttnn.bfloat8_b:
return True, "Not Supported"
return False, None


Expand Down
6 changes: 5 additions & 1 deletion ttnn/ttnn/operations/unary.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ def _golden_function(input_tensor: ttnn.Tensor, **_):
return torch_function(input_tensor)

def _unary_validate_input_tensors(operation_name, input_tensor, *args, **kwargs):
if operation_name in ["ttnn.logical_not"]:
supported_dtypes = (ttnn.bfloat16,)
else:
supported_dtypes = (ttnn.bfloat16, ttnn.bfloat8_b)
ttnn.validate_input_tensor(
operation_name,
input_tensor,
ranks=(2, 3, 4),
dtypes=(ttnn.bfloat16, ttnn.bfloat8_b),
dtypes=supported_dtypes,
layouts=(ttnn.TILE_LAYOUT, ttnn.ROW_MAJOR_LAYOUT),
can_be_on_device=True,
can_be_on_cpu=False,
Expand Down
Loading