-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix dynamo handler str userdefinedobjectvariable #130320
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
Fix dynamo handler str userdefinedobjectvariable #130320
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/130320
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 2cb35d4 with merge base ceedee2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case showing that the behavior is same between eager and dynamo
Add one for when class defines __str__
and another when it does not
…thub.com:datagero/pytorch into fix-dynamo-handler-str-userdefinedobjectvariable
@oulgen tests added in tests/dynamo/test_functions.py::DefaultTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@oulgen Thanks - Do I need to fix the failed checks? lint would be straigthforward but not so sure of the rest which appear unrelated |
You won't be able to land your changes until the CI is completely green. If you don't think that these breakages are due to your change, you can rebase on top of viable/strict so trunk is clean |
) Pull Request resolved: pytorch#129343 Approved by: https://github.com/lezcano
…ch#130306) Fixes pytorch#127649 Pull Request resolved: pytorch#130306 Approved by: https://github.com/janeyx99
Some functions used by Caffe2 were removed along with some outdated checks. Follows pytorch#130006. Pull Request resolved: pytorch#130322 Approved by: https://github.com/r-barnes
…30271) Afaict the previous check was too strict. Removing it passes all the mutation tests (mutation checks happen via the TensorVariable's mutable_local). Test Plan: - tests Pull Request resolved: pytorch#130271 Approved by: https://github.com/Chillee, https://github.com/ydwu4 ghstack dependencies: pytorch#130255, pytorch#130268
- Add AMD support for int4 kernel - Only supports CDNA2 and CDNA3 gpus for now - Uses `mfma_f32_16x16x16bf16` instruction for matrix multiply - Uses `v_and_or_b32` instruction and `__hfma2` instrinsic for unpacking bf16 values - Enable hipify for `__nv_bfloat16` and `__nv_bfloat162` data types - Enable int4 unit tests for CDNA2 and CDNA3 AMD gpus - Fix torchscript issues due to hipify for `__nv_bfloat16` type - TorchScript has its own implementation for bfloat16 type - Implemented in `__nv_bloat16` structure at [resource_strings.h](https://github.com/pytorch/pytorch/blob/main/torch/csrc/jit/codegen/fuser/cuda/resource_strings.h) - So, we shouldn't hipify any reference of `__nv_bfloat16` in the torchscript implementation - Hence moved the `__nv_bfloat16` direct references in `codegen.cpp` and `cuda_codegen.cpp` to `resource_strings.h` which is already exempted from hipify Fixes pytorch#124699 Fixes meta-pytorch/gpt-fast/issues/154 Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> Pull Request resolved: pytorch#129710 Approved by: https://github.com/malfet
As title, patch the dtype in torch.fx.graph Pull Request resolved: pytorch#130339 Approved by: https://github.com/angelayi
Fixes pytorch#130241 that is a reopen pr of pytorch#130244, for possibly fixing the failed job Pull Request resolved: pytorch#130305 Approved by: https://github.com/Skylion007
This adds a `_run_handler` method that will invoke a specific handler. Test plan: ``` python test/distributed/elastic/test_control_plane.py ``` Pull Request resolved: pytorch#130149 Approved by: https://github.com/kurman, https://github.com/c-p-i-o
…128599)" This reverts commit 940e447. Reverted pytorch#128599 on behalf of https://github.com/izaitsevfb due to breaking internal APS tests, see D59498864 ([comment](pytorch#128599 (comment)))
…odes) (pytorch#130064) We add torch.library.Library._register_torch_dispatch_rule. Here, a user can provide us a specific rule to run for a specific (torch_dispatch_class, operator) pair. The motivation is that a user might want to extend a subclass/mode but may not have access to the source code of the subclass/mode. I'll make this public in a follow-up PR if we think the approach and API is good. Keep in mind that many subclasses will likely deliver their own open registration solution (DTensor has register_sharding_prop_rule and NJT has register_jagged_op); _register_torch_dispatch_rule is meant as a catch-all open registration mechanism for when the subclass hasn't provided anything more specific. Test Plan: - new tests Pull Request resolved: pytorch#130064 Approved by: https://github.com/albanD
…0261) This is the API for defining the interaction between a torch_dispatch class and a custom op. Taking API bikeshedding. Test Plan: - new tests Pull Request resolved: pytorch#130261 Approved by: https://github.com/albanD ghstack dependencies: pytorch#130064
…ces (pytorch#130315) Summary: This diff fixes a bug, where all record_annotations will save a TraceEntry to each of the device_traces. Instead, we should only save annotations to the current device_trace that is being called by the thread calling the native allocator's recordAnnotation. Test Plan: CI and ran workloads on MVAI WPR FBR. Reviewed By: zdevito Differential Revision: D59477339 Pulled By: aaronenyeshi Pull Request resolved: pytorch#130315 Approved by: https://github.com/zdevito
…30271) Afaict the previous check was too strict. Removing it passes all the mutation tests (mutation checks happen via the TensorVariable's mutable_local). Test Plan: - tests Pull Request resolved: pytorch#130271 Approved by: https://github.com/Chillee, https://github.com/ydwu4 ghstack dependencies: pytorch#130255, pytorch#130268
…ytorch#130271)" This reverts commit adb6568. Reverted pytorch#130271 on behalf of https://github.com/clee2000 due to broke inductor/test_flex_attention https://github.com/pytorch/pytorch/actions/runs/9863205414/job/27236960046 https://hud.pytorch.org/pytorch/pytorch/commit/adb65682affdfc37f724c02ea8c8930d3925fc07 Test not run on PR due to bad TD ([comment](pytorch#130271 (comment)))
…orch#130227)" This reverts commit 6413998. Reverted pytorch#130227 on behalf of https://github.com/izaitsevfb due to breaks internal builds, please see D59498662 ([comment](pytorch#130227 (comment)))
…ytorch#130216) Follows pytorch#120353 Pull Request resolved: pytorch#130216 Approved by: https://github.com/albanD
Due to the removal of Caffe2 code. Pull Request resolved: pytorch#130089 Approved by: https://github.com/r-barnes, https://github.com/albanD
Fixes pytorch#129719 Pull Request resolved: pytorch#129824 Approved by: https://github.com/angelayi, https://github.com/yushangdi
…ytorch#130329) Follows pytorch#130300 Pull Request resolved: pytorch#130329 Approved by: https://github.com/ezyang
Pull Request resolved: pytorch#128416 Approved by: https://github.com/amjames, https://github.com/lezcano
…thub.com:datagero/pytorch into fix-dynamo-handler-str-userdefinedobjectvariable
@datagero Can you take a look at the failures? |
…lexAttention numerics to be as accurate as FA2) (pytorch#130250)" This reverts commit 3e48d92. Reverted pytorch#130250 on behalf of https://github.com/izaitsevfb due to depends on pytorch#130227 which needs to be reverted ([comment](pytorch#130250 (comment)))
…orch#130227)" This reverts commit 6413998. Reverted pytorch#130227 on behalf of https://github.com/izaitsevfb due to breaks internal builds, please see D59498662 ([comment](pytorch#130227 (comment)))
Attempting to fix tests, I think #130506 will have a better chance as starting clean. |
Fixes #130301
Adjusted the call_str method to handle str conversion for UserDefinedObjectVariable.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang