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

Remove global node_id_to_kernel #16864

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Remove global node_id_to_kernel #16864

wants to merge 3 commits into from

Conversation

nhuang-tt
Copy link
Member

Ticket

#16364

Problem description

  • Need to update FD test cases to use new FD topology features
  • Currently all functions in topology are coded to use the global node_id_to_kernel which makes it not usable in test prefetcher / dispatcher

What's changed

  • Replaced the usage of raw pointers with smart pointers
  • Uplifted node_id_to_kernel to FDTopologyManager. This internal class is accessed by the DevicePool and Device implementations.
  • Topology functions now accept a parameter node_id_to_kernel which is essentially the FD Topology Graph
  • Added get active device ids to DevicePool

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • (For models and ops writers) Full new models tests passes
  • New/Existing tests provide coverage for changes

the topology functions need to accept the topology
graph as a parameter. using a global makes it hard
to use this code for tests

- removed the usage of raw pointers
- uplifted node_id_to_kernel to FDTopologyManager
@nhuang-tt nhuang-tt marked this pull request as ready for review January 17, 2025 19:07
@nhuang-tt nhuang-tt marked this pull request as draft January 17, 2025 19:28
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