-
Notifications
You must be signed in to change notification settings - Fork 1k
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 there a way to print tensor while debugging? #1286
Comments
Perhaps you can comment to #1279? I have noticed that there appears no way to modify or access specific elements. |
I think what you are refering to are debugger visualizers, which allow to customize how the This would allow us to customize the developer experience and e.g. display the values, type and shape of a tensor easily in the debugger. |
Currently, there is no API to get the data of an n-dimensional tensor. |
What do you mean by this? The For the original question, we currently implement the |
I think the problem here is, that CodeLLDB (at least on windows) wont use the BadDebuggingDisplay.mp4But it should be relatively easy to implement some debugger visualizers as we already have working |
@LaurentMazare, sorry for the lack of clarity - I meant there is no way (to my knowledge) to get n-dimensional data out of a tensor without checking the rank. As another question: is there an API to modify tensor elements already - perhaps to return an |
Sorry I'm a bit lazy here and haven't google but would you know if codelldb/... provide some hooks that let you customize the printing of arbitrary data structures. I imagine that it's likely to be the case. |
I believe this should do the trick: https://rust-lang.github.io/rfcs/3191-debugger-visualizer.html#supporting-pretty-printers |
Took a stab at this in #1836 |
I need to see tensor values and shape.
Hardcoding println is inconvenient.
This seems to be less convenient than python.
I wonder if there is a better way.
The text was updated successfully, but these errors were encountered: