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

Refactor types #357

Merged
merged 2 commits into from
Dec 8, 2024
Merged

Refactor types #357

merged 2 commits into from
Dec 8, 2024

Conversation

broskoTT
Copy link
Contributor

@broskoTT broskoTT commented Nov 30, 2024

Issue

Related to #103

Description

Reformat ARCH into tt::umd::Arch
While at it, I looked at other types, and realised that cluster_types are a thing.
And now we have 3 or 4 different type files, so this warrants a dedicated folder for these small types.

List of the changes

  • Initially renamed tt::ARCH to tt::umd::Arch. Then figured out through comments that it actually makes more sense to leave it inside tt:: namespace. Then figured out the change from ARCH -> Arch is unnecessary, and doesn't justify the amount of changes needed.
  • Renamed file from tt_arch_type.h to types/arch.h
  • Renamed tt_cluster_descriptor_types.h to types/cluster_descriptor_types.h
  • Moved structs from cluster.h to types/cluster_types.h
  • Renamed xy_pair.h to types/xy_pair.h
  • Marked tt_xy_pair.h to be deleted.
  • Consolidated multiple arch_to_string and string_to_arch methods into a single source of truth, which should be fine for all applications

Following changes will be

  1. adding everything to tt::umd namespace
  2. removing tt_ prefix from all classes.

Testing

Code builds in existing CI tests.

API Changes

This PR has API changes:

@broskoTT broskoTT marked this pull request as ready for review November 30, 2024 12:46
@broskoTT broskoTT mentioned this pull request Nov 30, 2024
2 tasks
@broskoTT broskoTT added the changes api API changing PR, needs changes in client code label Dec 1, 2024
Copy link
Contributor

@pjanevskiTT pjanevskiTT left a comment

Choose a reason for hiding this comment

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

Like the changes, let me know what you think about namespace for ARCH

device/api/umd/device/architecture_implementation.h Outdated Show resolved Hide resolved
device/api/umd/device/types/arch.h Outdated Show resolved Hide resolved
Copy link
Contributor

@pjanevskiTT pjanevskiTT left a comment

Choose a reason for hiding this comment

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

approved after discussion about tt::ARCH

more fixes, revert some changes

more refactorings

minor

arch to tt

fix after rebase

revert Arch to ARCH
@broskoTT broskoTT merged commit e92ac1c into main Dec 8, 2024
19 of 22 checks passed
@broskoTT broskoTT deleted the brosko/ttarch branch December 8, 2024 19:40
broskoTT added a commit to tenstorrent/tt-metal that referenced this pull request Dec 8, 2024
### Ticket
All related to #13948

### Problem description
Some api header files have been moved around in UMD repo.
UMD PR: tenstorrent/tt-umd#357

### What's changed
- umd/device/tt_arch_type.h -> umd/device/types/arch.h
- umd/device/tt_cluster_descriptor_types.h ->
umd/device/types/cluster_descriptor_types.h
- umd/device/xy_pair.h -> umd/device/types/xy_pair.h
- get_arch_str -> tt::arch_to_str

### Checklist
- [x] All post-commit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224723517
- [x] Blackhole post-commit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224723937
- [x] (Single-card) Model perf tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224724459
- [ ] (Single-card) Device perf regressions :
https://github.com/tenstorrent/tt-metal/actions/runs/12224725026
- [x] (T3K) T3000 unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224725640
- [x] (T3K) T3000 demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224726199
- [x] (TG) TG unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224726548
- [x] (TG) TG demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224726936
- [x] (TGG) TGG unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224727791
- [x] (TGG) TGG demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12224728493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes api API changing PR, needs changes in client code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants