Skip to content

Conversation

pytorchbot
Copy link
Collaborator

Summary:
I'm not sure how this worked before, but these sites called functions under torch::executor without actually qualifying them. Qualify them explicitly, because the "can call without qualification" magic stops working when we move the etensor types in D63294217.

In a few places I used namespace etrt = executorch::runtime; instead of a using statement for a particular function, like etrt::isIntegralType. If I just say using executorch::runtime::isIntegralType, those files fail in aten mode because the unqualified call to isIntegralType() is deemed ambiguous in the presence of c10::isIntegralType() -- but afaict that c10 version isn't using'd into the global namespace, so I don't know why it conflicts. It'd be good to figure that out at some point, but this works for now.

Differential Revision: D63476419

Summary:
Pull Request resolved: #5709

I'm not sure how this worked before, but these sites called functions under torch::executor without actually qualifying them. Qualify them explicitly, because the "can call without qualification" magic stops working when we move the etensor types in D63294217.

In a few places I used `namespace etrt = executorch::runtime;` instead of a using statement for a particular function, like `etrt::isIntegralType`. If I just say `using executorch::runtime::isIntegralType`, those files fail in aten mode because the unqualified call to `isIntegralType()` is deemed ambiguous in the presence of `c10::isIntegralType()` -- but afaict that `c10` version isn't `using`'d into the global namespace, so I don't know why it conflicts. It'd be good to figure that out at some point, but this works for now.

I also updated custom_kernel_example to stop using the `torch::` namespace.

Reviewed By: swolchok

Differential Revision: D63476419

fbshipit-source-id: 2300fc1fa5d5af6f6f747d3a0c31db5099389dcc
(cherry picked from commit 5605954)
Copy link

pytorch-bot bot commented Sep 30, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 2c66951 with merge base eecf74f (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 30, 2024
Copy link
Contributor

@jackzhxng jackzhxng left a comment

Choose a reason for hiding this comment

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

Approving non-docs pr because fixes failures in aten mode

@jackzhxng jackzhxng merged commit 41a765d into release/0.4 Sep 30, 2024
34 checks passed
@jackzhxng jackzhxng deleted the cherry-pick-5709-by-pytorch_bot_bot_ branch September 30, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants