We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Run pytest
import pytest import torch import ttnn from tests.ttnn.utils_for_testing import assert_with_pcc from models.utility_functions import torch_random @pytest.mark.parametrize("batch_size", [1, 32]) @pytest.mark.parametrize("h", [32]) @pytest.mark.parametrize("w", [64000]) @pytest.mark.parametrize("dim", [-1]) def test_argmax(device, batch_size, h, w, dim): torch.manual_seed(0) torch_input_tensor = torch.randn((1, 1, h, w), dtype=torch.bfloat16) torch_output_tensor = torch.argmax(torch_input_tensor, dim=3) input_tensor = ttnn.from_torch(torch_input_tensor, device=device) output_tensor = ttnn.argmax(input_tensor, dim=3, use_multicore=False if batch_size > 1 else True) output_tensor = ttnn.to_torch(output_tensor) assert_with_pcc(torch_output_tensor, output_tensor)
Expected:
Actual:
FAILED test_argmax.py::test_argmax[-1-64000-32-1] - AssertionError: list(expected_pytorch_result.shape)=[1, 1, 32] vs list(actual_pytorch_result.shape)=[1, 1, 1, 32] FAILED test_argmax.py::test_argmax[-1-64000-32-32] - AssertionError: list(expected_pytorch_result.shape)=[1, 1, 32] vs list(actual_pytorch_result.shape)=[1, 1, 1, 32]
Adding in a reshape fixes the problem, but argmax should set the shapes properly by itself.
The text was updated successfully, but these errors were encountered:
bbradelTT
No branches or pull requests
Run pytest
Expected:
Actual:
Adding in a reshape fixes the problem, but argmax should set the shapes properly by itself.
The text was updated successfully, but these errors were encountered: