-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add Profiler base class #444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. No test cases, so not running but I guess it can't break anything...
from lava.magma.core.run_configs import RunConfig, Loihi2HwCfg | ||
|
||
# Dictionary to relate a certain RunCfg to specific Profiler | ||
run_cfg_dict: ty.Dict[RunConfig, RunConfig] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this maybe go into the Profiler
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was, but this dict needs to be filled based on available imports. The current solution can probably be improved, but it fits with our current style to try importing loihi specific modules.
* Update profiler.py * Update profiler.py * Update profiler.py * Update profiler.py
Objective of pull request: Adding a profiler base class which selects an appropriate Profiler based on the chosen RunCfg. Currently only the Loihi2HWProfiler for profiling Loihi 2 will be available, if lava-loihi is also installed (INRC members only). In the future this class can choose profiler implementations for Loihi 1, Loihi 2, CPU, GPU or other neuromorphic hardware.
Pull request checklist
Your PR fulfills the following requirements:
flakeheaven lint src/lava tests/
) and (bandit -r src/lava/.
) pass locallypytest
) passes locallyPull request type
Please check your PR type:
What is the current behavior?
What is the new behavior?
Does this introduce a breaking change?
Supplemental information