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

Special Shape of [38809] will hang #685

Open
swimdi opened this issue Dec 27, 2024 · 0 comments
Open

Special Shape of [38809] will hang #685

swimdi opened this issue Dec 27, 2024 · 0 comments
Assignees

Comments

@swimdi
Copy link
Collaborator

swimdi commented Dec 27, 2024

On dispatch device, shape [38000] and [39000] is ok for ttnn.from_torch, but the special shape of [38809] will hang

import torch
import ttnn

dispatch_core_config = ttnn.DispatchCoreConfig(ttnn.device.DispatchCoreType.ETH, ttnn.DispatchCoreAxis.ROW)
device = ttnn.open_device(device_id=0, dispatch_core_config=dispatch_core_config, l1_small_size=16384)

# ok
torch_indices_pass1 = torch.randint(0, 732, [38000])
indices_tensor_pass1 = ttnn.from_torch(torch_indices_pass1, device = device, layout = ttnn.ROW_MAJOR_LAYOUT, dtype = ttnn.uint32)
# ok
torch_indices_pass2 = torch.randint(0, 732, [39000])
indices_tensor_pass2 = ttnn.from_torch(torch_indices_pass2, device = device, layout = ttnn.ROW_MAJOR_LAYOUT, dtype = ttnn.uint32)

# hang
torch_indices_hang = torch.randint(0, 732, [38809])
indices_tensor_hang = ttnn.from_torch(torch_indices_hang, device = device, layout = ttnn.ROW_MAJOR_LAYOUT, dtype = ttnn.uint32)

And if device is not dispatch, then shape [38809] is ok

import torch
import ttnn

device = ttnn.open_device(device_id=0, l1_small_size=16384)

# not hang
torch_indices = torch.randint(0, 732, [38809])
indices_tensor = ttnn.from_torch(torch_indices, device = device, layout = ttnn.ROW_MAJOR_LAYOUT, dtype = ttnn.uint32)

This special shape is from beit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants