Skip to content

POC: matmul support and get singlecore matmul example working#207

Draft
zoecarver wants to merge 13 commits intozoecarver/ttl-skillsfrom
zoecarver/matmul-example-working
Draft

POC: matmul support and get singlecore matmul example working#207
zoecarver wants to merge 13 commits intozoecarver/ttl-skillsfrom
zoecarver/matmul-example-working

Conversation

@zoecarver
Copy link
Contributor

NOT FOR REVIEW

Just a proof of concept to scope out matmul support.

# SPDX-FileCopyrightText: (c) 2025 Tenstorrent AI ULC
#
# SPDX-License-Identifier: Apache-2.0
# up to tt-lang spec, not intended to compile or run currently
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not proposing these changes to the example. Once this is ready for review, I'll add proper tests and leave this untouched until we have dynamic indexing.

golden = torch.matmul(a_torch, b_torch)
result = ttnn.to_torch(c).to(torch.bfloat16)
print(result)
assert_with_ulp(golden, result)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example output (no assert):

tensor([[ 8.2500, 10.1250,  9.7500,  ...,  9.2500,  8.2500,  9.0625],
        [ 6.0938,  8.0000,  8.0625,  ...,  7.1250,  6.8750,  7.7188],
        [ 8.1875,  9.7500,  8.9375,  ...,  7.6875,  7.7812,  9.1250],
        ...,
        [ 8.9375,  9.6875,  9.9375,  ...,  8.1250,  8.3750, 10.3125],
        [ 8.3125,  9.9375,  7.6562,  ...,  8.0625,  7.8438,  8.3125],
        [ 9.0000, 10.9375,  9.0625,  ...,  8.1875,  9.0000, 10.0000]],
       dtype=torch.bfloat16)

[5070] 1.5 seconds (3.3 KHz)
========================================
TEST PASSED
========================================

@zoecarver zoecarver force-pushed the zoecarver/matmul-example-working branch from b83565c to b110bb7 Compare January 14, 2026 20:55
@zoecarver zoecarver changed the base branch from zoecarver/open-prs-jan2 to main January 14, 2026 20:55
@zoecarver zoecarver changed the base branch from main to zoecarver/gardening January 14, 2026 20:56
@zoecarver zoecarver changed the base branch from zoecarver/gardening to zoecarver/ttl-skills January 14, 2026 20:56
@zoecarver zoecarver force-pushed the zoecarver/ttl-skills branch from 8705fef to f02b96b Compare January 20, 2026 15:13
commit f3928e2
Author: Zoe Carver <zcarver@tenstorrent.com>
Date:   Tue Jan 20 10:09:27 2026 -0500

    use pytest

commit 57d7bc5
Author: Zoe Carver <zcarver@tenstorrent.com>
Date:   Tue Jan 20 10:05:43 2026 -0500

    pre commit

commit ea32b74
Author: Zoe Carver <zcarver@tenstorrent.com>
Date:   Tue Jan 20 10:04:21 2026 -0500

    Fix bug with tensor accessors on intermediate cbs
@zoecarver zoecarver force-pushed the zoecarver/matmul-example-working branch from b110bb7 to adbe45e Compare January 20, 2026 15:58
@zoecarver zoecarver force-pushed the zoecarver/ttl-skills branch from 6e4de6f to 3b30b5c Compare February 5, 2026 19:40
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

Successfully merging this pull request may close these issues.

1 participant