-
Notifications
You must be signed in to change notification settings - Fork 85
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
Allow Proxy creation without a set TraceCtx #1598
base: proxy-update2
Are you sure you want to change the base?
Conversation
I'm surprised this appears to be causing CI failures! I wonder what's going on. Fixing #1593 sounds great, and this looks like a surgical way to support the creation of tensor proxies outside of a trace. What can we actually do with these tensor proxies — just call meta functions directly on them? That alone sounds interesting. Could we make the creation of traceless tensor proxies more explicit — at least for now — like by requiring a special function be called? The function could pass a new option kwarg to the existing functions (like Proxy creation and name origination), like In the future (or this PR), we could also imagine that name generation is still automatic when |
This is exactly the opposite direction of where we should move. Traces need to own proxies more, not less. |
I don't think these ideas have to be in conflict. The traceless proxies couldn't be used in any trace (because they're not owned by any trace), so they shouldn't interoperate with proxies owned by a trace |
All the failures are from the base branch (#1596) and are now resolved. The errors were due to the reliance of jit_ext.py file on the assumption that a new name would be generated if the requested name is used (fixed now). |
Yes, call meta functions, but only simple ones that do not require an active trace (ones that do not call other symbols). It's useful for development, exploration, and debugging. Less concepts to explain and keep in mind to a new developer when beginning to explain the internals of Thunder.
Yes, we used to have a global counter in the early versions. Actual names are needed when a bound symbol is constructed to generate a Python line of code.
Sure, we can do that. My intention is to decrease cognitive friction for someone coming from other array frameworks. Setting |
Can we make this a utility function "traceless_tensorproxy" or so rather than baking it into the proxy main path, please? I would prefer not to have proxies that will be added to traces next being created outside the trace context by accident. |
Now creating TensorProxies is as simple as in PyTorch:
Base PR: #1597.
Fixes #1593.