-
Notifications
You must be signed in to change notification settings - Fork 24.3k
[BE] Do not use numpy
in torch._inductor.codegen.cpp
#109324
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
Conversation
`s/numpy.iinfo(numpy.int32)/torch.iinfo(torch.int32)/` as those two are interchangeable
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109324
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 31af549 with merge base 03e35ef ( 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.
Thanks!
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
@pytorchbot merge |
The merge job was canceled. If you believe this is a mistake, then you can re trigger it through pytorch-bot. |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
) `s/numpy.iinfo(numpy.int32)/torch.iinfo(torch.int32)/` as those two are interchangeable Partially addresses pytorch#109387 Pull Request resolved: pytorch#109324 Approved by: https://github.com/albanD
Cherrypick of 4ee179c a9bf103 and fb58a72 into release/2.1 branch Test plan: `python3 -c "import torch;torch.compile(lambda x:print(x))('Hello World')"` Fixes #109387 to the release branch * Fix `ConstantVariable` init method if NumPy is missing By adding `np is not None` check before `isinstance(value, np.number)` Partially addresses #109387 * [BE] Do not use `numpy` in `torch._inductor.codegen.cpp` (#109324) `s/numpy.iinfo(numpy.int32)/torch.iinfo(torch.int32)/` as those two are interchangeable Partially addresses #109387 Pull Request resolved: #109324 Approved by: https://github.com/albanD * Use `torch.cumsum` instead of numpy one (#109400) `s/list(numpy.cumsum(foo))/torch.cumsum(torch.tensor(foo), 0).tolist()/` Test plan: ` python3 ../test/inductor/test_split_cat_fx_passes.py -v` Partially addresses #109387 Pull Request resolved: #109400 Approved by: https://github.com/ezyang --------- Co-authored-by: Nikita Shulga <nshulga@meta.com>
removing from 2.1.1 milestones since this was already meged to 2.1 |
s/numpy.iinfo(numpy.int32)/torch.iinfo(torch.int32)/
as those two are interchangeablePartially addresses #109387
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @ngimel @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov