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

feat: improve debugger api #116

Merged
merged 10 commits into from
Nov 2, 2022
Merged

feat: improve debugger api #116

merged 10 commits into from
Nov 2, 2022

Conversation

ayoub-louati
Copy link
Contributor

@ayoub-louati ayoub-louati commented Oct 21, 2022

Improve debugger api. Inputs are no more passed in debugger initialization, we can pass input tensor in get_ptr function.
close #43

@ayoub-louati ayoub-louati self-assigned this Oct 21, 2022
@ayoub-louati ayoub-louati added the enhancement New feature or request label Oct 21, 2022
@github-actions github-actions bot added feature and removed feature labels Oct 21, 2022
src/kernl/utils/debugger.py Outdated Show resolved Hide resolved
src/kernl/utils/debugger.py Outdated Show resolved Hide resolved
Copy link
Contributor

@gaetansnl gaetansnl left a comment

Choose a reason for hiding this comment

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

looks good, test pass

self.total_gm_read = 0
self.total_gm_write = 0

def _add_input(self, tensor: torch.Tensor):
Copy link
Contributor

Choose a reason for hiding this comment

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

to make code safer we could check existance in this method "_add_input_if_not_exists", so a method can't create inconsistent state + it will reduce number of methods

@ayoub-louati ayoub-louati merged commit f22b39c into main Nov 2, 2022
@ayoub-louati ayoub-louati deleted the feat/improve-debugger-api branch November 2, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve debugger API
3 participants