scalene
scalene copied to clipboard
Is hybrid call stack supported?
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.
I'm think I'm looking for the same thing: maybe this works for you?
https://github.com/joerick/pyinstrument