-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add a Notebook about Trace, BoundSymbol, Symbol and Proxy #1419
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:00Z typos: into its components. For Inspection, it... |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:01Z Line #2. exec_trace: list[Trace] = thunder.last_traces(jfn)[-1] It is natural to wonder what the preceding elements in this list are. Maybe a sentence addressing that could be added. |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:01Z While names are discussed in the later section about Proxies, I expected some treatment of where the t*s come from. Also, the t_*s are completely mysterious as they don't appear in the printed trace. crcrpar commented on 2024-11-12T12:47:38Z really good point.
lightning-thunder/thunder/core/jit_ext.py Lines 1794 to 1806 in f7b2e15
kshitij12345 commented on 2024-11-12T12:51:03Z Interesting, at first glance, I assumed all names were present in the trace. Will try to understand what is happening here. Thanks! kshitij12345 commented on 2024-11-12T12:57:02Z Thanks @crcrpar, I typed the above comment before seeing your comment. |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:02Z I find this section very informative. I like that all the |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:03Z typo: its |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:03Z typos: an operation to be performed on its inputs. It is comprise of an |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:04Z Line #6. # These inputs and outputs are usually Proxy object (see below) typo: Proxy objects |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:05Z Line #8. # In this tutorial, we will re-use one of the existing symbols that already exists. This comment is confusing to me. So,
Since |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:06Z Line #18. si = SigInfo("my_trace")
|
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:06Z Why does this trace look simpler than both the original and the one below? |
View / edit / reply to this conversation on ReviewNB beverlylytle commented on 2024-11-11T13:13:07Z Line #14. o = add(x, y) Why is kshitij12345 commented on 2024-11-12T12:48:03Z Actually, the first |
lightning-thunder/thunder/core/jit_ext.py Lines 1794 to 1806 in f7b2e15
View entire conversation on ReviewNB |
Actually, the first View entire conversation on ReviewNB |
Interesting, at first glance, I assumed all names were present in the trace. Will try to understand what is happening here. Thanks! View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB crcrpar commented on 2024-11-12T12:53:06Z Line #3. from thunder.core.trace import TraceCtx as Trace, tracectx out of curiosity, why do we import TraceCtx as Trace in some places? |
View / edit / reply to this conversation on ReviewNB crcrpar commented on 2024-11-12T12:53:07Z Line #13. add_bsym = BoundSymbol(sym=add, args=(x, y), kwargs={}, output=o) I thought we could kshitij12345 commented on 2024-11-12T12:59:18Z That should work as well. The reason I choose to construct |
Thanks @crcrpar, I typed the above comment before seeing your comment. View entire conversation on ReviewNB |
That should work as well. The reason I choose to construct View entire conversation on ReviewNB |
@kshitij12345 Great stuff. Thank you for doing this! re creating BoundSymbols, the recommendation should be:
If you want to have new bound symbols somewhere else then at the end, use |
View / edit / reply to this conversation on ReviewNB crcrpar commented on 2024-11-13T15:06:56Z is the left top code snippet the first one of I don't demand an update of it but
That said, maybe use the example used below, f(x, y): return x+y, might be nice to do |
No description provided.