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

Modified mapper to handle disconnected lif components connected to sa… #294

Merged
merged 5 commits into from
Aug 15, 2022

Conversation

ysingh7
Copy link
Contributor

@ysingh7 ysingh7 commented Aug 9, 2022

…me cproc

Issue Number:

Objective of pull request:

Pull request checklist

Your PR fulfills the following requirements:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • Lint (flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally
  • Build tests (pytest) passes locally

Pull request type

Please check your PR type:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation changes
  • Other (please describe):

What is the current behavior?

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Supplemental information

Copy link
Contributor

@mgkwill mgkwill left a comment

Choose a reason for hiding this comment

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

Hi Yash,

It seems like you are replacing l_addr.core_id in map_cores() and _set_virtual_address_nc() with self.mapper_core_offset that starts at 0 and is incriminated after each use, and kept track of in self.mapper_core_dict.

Later chip_idx and core_idx are calculated based on this replaced value and used in initialization of NcVirtualAddress:

chip_idx = l_addr.core_id // num_cores
core_idx = l_addr.core_id % num_cores

It's not clear to me if l_addr.core_id is entirely arbitrary and can be replaced with an arbitrary value. Can you explain the reasoning behind this?

src/lava/magma/compiler/mapper.py Outdated Show resolved Hide resolved
@ysingh7
Copy link
Contributor Author

ysingh7 commented Aug 15, 2022

Hi Yash,

It seems like you are replacing l_addr.core_id in map_cores() and _set_virtual_address_nc() with self.mapper_core_offset that starts at 0 and is incriminated after each use, and kept track of in self.mapper_core_dict.

Later chip_idx and core_idx are calculated based on this replaced value and used in initialization of NcVirtualAddress:

chip_idx = l_addr.core_id // num_cores
core_idx = l_addr.core_id % num_cores

It's not clear to me if l_addr.core_id is entirely arbitrary and can be replaced with an arbitrary value. Can you explain the reasoning behind this?

l_addr.core_id is something generated by compiler for a NeuroProcGroup. Two different disconnected NeuroProcGroups can have same exact l_addr.core. So in that sense its arbitary. Job of the mapper is to provide unique id. Thats why we are reassigning the l_core_id.

@mgkwill mgkwill merged commit 677821a into main Aug 15, 2022
@mgkwill mgkwill deleted the discon branch August 15, 2022 22:11
monkin77 pushed a commit to monkin77/thesis-lava that referenced this pull request Jul 12, 2024
lava-nc#294)

* Modified mapper to handle disconnected lif components connected to same cproc
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