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

How to expose the "register_pre_hook()" interface? #51

Open
letian-zhang opened this issue Jun 15, 2020 · 1 comment
Open

How to expose the "register_pre_hook()" interface? #51

letian-zhang opened this issue Jun 15, 2020 · 1 comment

Comments

@letian-zhang
Copy link

Hi, I stack in the first step. How to profile the runtime of forward and backward? I've never tried to modified the pytorch source code before, and the 'python_cpp_function.h' or 'python_cpp_function.cpp' isn't clear for me to write the pre_hook interface. Could you provide the change you made to pytorch source code? Thx a lot.

@deepakn94
Copy link
Collaborator

This is a good starting point: https://github.com/msr-fiddle/pipedream/blob/master/pre_hook.patch.

However, you shouldn't need to modify PyTorch source code if all you want to do is profile some models. Look at examples in profiler to see the application changes needed.

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

No branches or pull requests

2 participants