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

from_torch multi-paged buffer support #16861

Open
nardoTT opened this issue Jan 17, 2025 · 2 comments
Open

from_torch multi-paged buffer support #16861

nardoTT opened this issue Jan 17, 2025 · 2 comments
Assignees
Labels
bug Something isn't working metal tt-metal issue P1

Comments

@nardoTT
Copy link
Contributor

nardoTT commented Jan 17, 2025

Describe the bug
from_torch operation errors for large tensors that require multi-paged buffer support:

RuntimeError: TT_FATAL @ ../tt_metal/impl/dispatch/command_queue.cpp:1261: num_pages == 1
E info:
E TODO: add support for multi-paged buffer with page size > 64KB

To Reproduce
Steps to reproduce the behavior:

@pytest.mark.parametrize("shape", [[1, 32, 250880]])
@pytest.mark.parametrize("input_layout", [ttnn.ROW_MAJOR_LAYOUT])
@pytest.mark.parametrize("output_layout", [ttnn.TILE_LAYOUT])
def test_to_layout_0(shape, input_layout, output_layout, device):
    torch.manual_seed(2005)
    input_a = torch.randn(shape, dtype=torch.bfloat16)
    input_tensor = ttnn.from_torch(input_a, device=device, layout=input_layout, dtype=ttnn.bfloat16) #fails here
    output_tensor = ttnn.to_layout(input_tensor, output_layout)
    output_tensor = ttnn.to_torch(output_tensor)
    assert_with_pcc(input_a, output_tensor)

@nardoTT nardoTT added the bug Something isn't working label Jan 17, 2025
@ayerofieiev-tt
Copy link
Member

What is the priority of this ask? What is the background?

@ayerofieiev-tt
Copy link
Member

@sagarwalTT can you please take a look at this assert being triggered?
https://github.com/tenstorrent/tt-metal/blame/main/tt_metal/impl/dispatch/command_queue.cpp#L1275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working metal tt-metal issue P1
Projects
None yet
Development

No branches or pull requests

4 participants