Skip to content

[Reland] Add sym_size/stride/numel/storage_offset to native_function.…#100749

Closed
SherlockNoMad wants to merge 1 commit intomainfrom
bahuang/sym_size_reland
Closed

[Reland] Add sym_size/stride/numel/storage_offset to native_function.…#100749
SherlockNoMad wants to merge 1 commit intomainfrom
bahuang/sym_size_reland

Conversation

@SherlockNoMad
Copy link
Contributor

@SherlockNoMad SherlockNoMad commented May 5, 2023

…yaml (#91… (#91919)

Summary:
Pull Request resolved: #91919 Approved by: https://github.com/ezyang

Fixes #ISSUE_NUMBER

Pull Request resolved: #92402

Reviewed By: ezyang

Differential Revision: D42565586

Pulled By: SherlockNoMad

fbshipit-source-id: 1c2986e45307e076d239836a1b45441a9fa3c9d9
ghstack-source-id: 969f4928486e04c57aaf98e20e3c3ca946c51613

Fixes #ISSUE_NUMBER

cc @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire

@pytorch-bot
Copy link

pytorch-bot bot commented May 5, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100749

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 84a92f2:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label May 5, 2023
@SherlockNoMad SherlockNoMad added the topic: not user facing topic category label May 5, 2023
@SherlockNoMad SherlockNoMad requested review from suo and zhxchen17 May 5, 2023 20:31
@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why you need these to be native function?

Comment on lines 886 to 941
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@SherlockNoMad
Copy link
Contributor Author

I'm curious why you need these to be native function?

They need to be properly aten op, so that they can be included in the Core Aten IR.
Also, folks are expecting aten.sym_size to be an OpOverload #97201
Also, we need schema for them.

@SherlockNoMad SherlockNoMad force-pushed the bahuang/sym_size_reland branch 2 times, most recently from 2670da5 to d09f044 Compare May 8, 2023 22:04
@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@albanD
Copy link
Collaborator

albanD commented May 8, 2023

But all of these would work with a registration from python right?

@SherlockNoMad
Copy link
Contributor Author

But all of these would work with a registration from python right?

Sorry, I missed one requirement.
Sigmoid will need to run this op via JIT kernel, and need to access its schema from C++.
So the registration need to be persistent in libtorch.

@SherlockNoMad SherlockNoMad force-pushed the bahuang/sym_size_reland branch from d09f044 to 5ccaee0 Compare May 9, 2023 17:14
@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@albanD
Copy link
Collaborator

albanD commented May 9, 2023

Do you mean a libtorch-only build will need to access it?
The usual dispatcher API to get a kernel even if it wasn't defined in c++. We do that to get our python-registered triton kernel here for example: https://github.com/pytorch/pytorch/blob/8769fb854d816d223cfb513979e97e23a93bddee/aten/src/ATen/native/sparse/SparseBlasImpl.cpp#LL97C10-L97C14

@SherlockNoMad
Copy link
Contributor Author

@pytorchbot rebase -s

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased bahuang/sym_size_reland onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout bahuang/sym_size_reland && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the bahuang/sym_size_reland branch from 5ccaee0 to 5def2ea Compare May 10, 2023 19:55
@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@suo
Copy link
Member

suo commented May 10, 2023

Do you mean a libtorch-only build will need to access it?

yeah

@pytorchmergebot
Copy link
Collaborator

Successfully rebased bahuang/sym_size_reland onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout bahuang/sym_size_reland && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the bahuang/sym_size_reland branch from 3236705 to 84a92f2 Compare May 12, 2023 17:04
@facebook-github-bot
Copy link
Contributor

@SherlockNoMad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@SherlockNoMad
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 12, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

arg = super(ChangeInputOutputSignature, self).placeholder(
f"arg{i}", (), {}
)
# Fill node.mata["val"] with faketensolintrunner from the input,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@suo lintrunner is being immortalized in _dynamo comments :P

@malfet
Copy link
Contributor

malfet commented May 17, 2023

@pytorchbot revert -m "It makes ExecuTorch sad, please land via codev and have better description" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

Can't revert PR that was landed via phabricator as D42565586. Please revert by going to the internal diff and clicking Unland.

malfet added a commit that referenced this pull request May 17, 2023
and fake_mode is not None
and isinstance(flat_args[i], torch.Tensor)
):
arg.node.meta["val"] = fake_mode.from_tensor(flat_args[i])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes executorch very unhappy, as it tries to compare number of args with number of matched_input_elements_positions, see #99461 / D45106409

@malfet
Copy link
Contributor

malfet commented May 17, 2023

Manually pushed the revert in 20cf42d

@kit1980
Copy link
Contributor

kit1980 commented May 22, 2023

FYI the correct linked diff for this PR is D45620400

jcaip pushed a commit that referenced this pull request May 23, 2023
SherlockNoMad added a commit that referenced this pull request Jun 6, 2023
#91919)

Summary:
…yaml (https://github.com/pytorch/pytorch/issues/91… (#91919)
Pull Request resolved: #91919 Approved by: https://github.com/ezyang

Fixes #ISSUE_NUMBER

Pull Request resolved: #92402

Pulled By:
SherlockNoMad

fbshipit-source-id: 1c2986e45307e076d239836a1b45441a9fa3c9d9
ghstack-source-id: 969f492

Fixes #ISSUE_NUMBER

cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire

Pull Request resolved: #100749
SherlockNoMad

Differential Revision: D45620400

fbshipit-source-id: 82fafda359febdf9246f63a1355e376ecf17d5cb
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45620400

yushangdi added a commit to yushangdi/pytorch that referenced this pull request Jul 22, 2024
Summary: remove _BLACK_LISTED_OPS after pytorch#100749

Test Plan: contbuild & OSS CI

Differential Revision: D60056130
yushangdi added a commit to yushangdi/pytorch that referenced this pull request Jul 22, 2024
Summary:
Pull Request resolved: pytorch#131361

remove _BLACK_LISTED_OPS after pytorch#100749

Test Plan: contbuild & OSS CI

Differential Revision: D60056130
pytorchmergebot pushed a commit that referenced this pull request Jul 24, 2024
Summary: remove _BLACK_LISTED_OPS after #100749

Test Plan: contbuild & OSS CI

Differential Revision: D60056130

Pull Request resolved: #131361
Approved by: https://github.com/angelayi
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Jul 25, 2024
Summary: remove _BLACK_LISTED_OPS after pytorch#100749

Test Plan: contbuild & OSS CI

Differential Revision: D60056130

Pull Request resolved: pytorch#131361
Approved by: https://github.com/angelayi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants