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

#12557: bias shape was wrong, and need to create pure torch tensor #12846

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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 tests/ttnn/unit_tests/operations/test_conv1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_conv(
torch.manual_seed(0)
conv_input_shape = [batch_size, input_channels, input_length]
conv_weight_shape = [output_channels, input_channels // groups, kernel_size]
conv_bias_shape = [1, 1, output_channels]
conv_bias_shape = [1, 1, 1, output_channels]
torch_input_tensor_ncl = torch.randn(conv_input_shape, dtype=torch.bfloat16).float()
torch_input_tensor = torch.permute(torch_input_tensor_ncl, (0, 2, 1))
torch_weight_tensor = torch.randn(conv_weight_shape, dtype=torch.bfloat16).float()
Expand Down Expand Up @@ -118,7 +118,7 @@ def run_conv(
)

tt_output_tensor = ttnn.from_device(tt_output_tensor_on_device)
mywoodstock marked this conversation as resolved.
Show resolved Hide resolved
torch_output_tensor = ttnn.to_torch(tt_output_tensor)
torch_output_tensor = torch.Tensor(ttnn.to_torch(tt_output_tensor))

# torch_output_tensor is in row major layout and NLC shape
# NLC to NCL
Expand Down
Loading