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

Is hybrid call stack supported? #733

Open
oleotiger opened this issue Dec 5, 2023 · 1 comment
Open

Is hybrid call stack supported? #733

oleotiger opened this issue Dec 5, 2023 · 1 comment

Comments

@oleotiger
Copy link

Is your feature request related to a problem? Please describe.
I want to catch the call stack from pytorch to C++ backend. For example, which function is called in C++ by torch.nn.softmax?

I wirte a case: test.py

import torch
x = torch.tensor([[1.0, 2.0, 3.0],
                  [4.0, 5.0, 6.0]])
softmax = torch.nn.Softmax(dim=1)
output = softmax(x)

and by scalene --stacks --json --no-browser test.py, there is no inforation about call stack into backend:

Describe the solution you'd like
I want a call stack (something like flamegraph?) which could tell me which C++ function is called by the operator.

Describe alternatives you've considered
No found yet.

@FergusFettes
Copy link

I'm think I'm looking for the same thing: maybe this works for you?

https://github.com/joerick/pyinstrument

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