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

#16339: let DispatchMemMap get created with custom DispatchSettings #17449

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

nhuang-tt
Copy link
Member

@nhuang-tt nhuang-tt commented Jan 31, 2025

Ticket

#16339

Problem description

DispatchMemMap hardcoded to use default settings.
Need to be able to use different settings for tests like Test Prefetcher and Test Dispatcher.
Need to be able to use settings that could be loaded from a file along with the FD topology.

What's changed

  • Singleton interface to customize DispatchSettings. Singleton will persist settings for various core_type / num_hw_cq combos. Callers can get / reset / modify the settings for the core type / cq combo.

  • DispatchMemMap will be created using the DispatchSettings, which may have been customized.

  • NOTE: Custom DispatchSettings should be setup early. E.g., during Device or DevicePool initialization

  • The DispatchSettings will be persisted for each {CoreType, #CQs}.

    • Changing #CQ during runtime is not supported. But accessing DispatchMemMap with a different CoreType can happen, e.g., during FD Topology init it needs the MemMap for WORKER AND ETH cores (tunnelers).
    • So the settings for each CoreType needs to be persisted. Might as well also add #CQs into the persistent store key.
  • Test CommandQueueSingleCardFixture.TestDispatchSettingsMutations

Checklist

TGG: https://github.com/tenstorrent/tt-metal/actions/runs/13130873636
APC: https://github.com/tenstorrent/tt-metal/actions/runs/13130870905
T3K: https://github.com/tenstorrent/tt-metal/actions/runs/13130877271

@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch from 0a43384 to b5f8b1b Compare January 31, 2025 20:07
@nhuang-tt nhuang-tt marked this pull request as ready for review January 31, 2025 20:07
@nhuang-tt nhuang-tt changed the title #16339: setup DispatchMemMap with custom settings #16339: let DispatchMemMap get passed in with custom DispatchSettings Jan 31, 2025
@nhuang-tt nhuang-tt changed the title #16339: let DispatchMemMap get passed in with custom DispatchSettings #16339: let DispatchMemMap get created with custom DispatchSettings Jan 31, 2025
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch 3 times, most recently from 43146c2 to 841e871 Compare January 31, 2025 23:42
@nhuang-tt nhuang-tt marked this pull request as draft January 31, 2025 23:59
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch from 841e871 to ed05ec9 Compare February 1, 2025 00:32
@nhuang-tt nhuang-tt marked this pull request as ready for review February 1, 2025 00:38
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch 4 times, most recently from d3f8e16 to 66c0ca0 Compare February 2, 2025 04:33
@nhuang-tt nhuang-tt requested a review from davorchap as a code owner February 2, 2025 04:33
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch 5 times, most recently from f6f60f0 to 91c795e Compare February 2, 2025 08:51
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch from e472697 to dee037f Compare February 3, 2025 17:20
- Previously DispatchMemMap was hardcoded to use only
  the default settings
- DispatchMemMap initialized using a DispatchSettings
  object with a core_type & num_hw_cqs combo
- Singleton access to DispatchSettings. Buffer sizes
  may be customized during device initialization
@nhuang-tt nhuang-tt force-pushed the nhuang/dispatch-mem-map-custom-settings branch from dee037f to 6e6fa4d Compare February 4, 2025 08:02
@nhuang-tt nhuang-tt merged commit 12344d0 into main Feb 4, 2025
278 of 371 checks passed
@nhuang-tt nhuang-tt deleted the nhuang/dispatch-mem-map-custom-settings branch February 4, 2025 18:10
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.

3 participants