Skip to content

Conversation

@cyyever
Copy link
Contributor

@cyyever cyyever commented Apr 29, 2025

Summary

This PR moves executorch::aten::{string_view,optional} to std counterparts.

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 29, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 02757cc with merge base c6c3616 (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 Apr 29, 2025
@cyyever cyyever force-pushed the std_sv branch 2 times, most recently from 0208795 to a935a30 Compare April 29, 2025 04:10
@cyyever
Copy link
Contributor Author

cyyever commented Apr 29, 2025

@pytorchbot label "topic: not user facing"

@cyyever cyyever changed the title Use std::string_view and std::optional instead of PyTorch alias Use std::string_view and std::optional instead of c10 alias Apr 29, 2025
@cyyever cyyever changed the title Use std::string_view and std::optional instead of c10 alias Use std::string_view and std::optional Apr 29, 2025
@tarun292
Copy link
Contributor

tarun292 commented May 2, 2025

@swolchok any thoughts on this PR?

@GregoryComer
Copy link
Member

I had proposed this change previously, but @dbort brought up that the std types throw exceptions, which may be a problem for no-exception environments. Has there been more discussion on this point?

@cyyever
Copy link
Contributor Author

cyyever commented May 3, 2025

Currently executorch::aten::{string_view,optional} are aliases of std types, so they are not noexcept, they throw.

Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

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

seems fine, but please put the submodule back and then ping me for accept

@cyyever
Copy link
Contributor Author

cyyever commented May 18, 2025

@swolchok Ping

@cyyever
Copy link
Contributor Author

cyyever commented May 18, 2025

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label May 18, 2025
Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

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

thanks!

@facebook-github-bot
Copy link
Contributor

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

@swolchok
Copy link
Contributor

swolchok commented Jun 3, 2025

this appears to have changed numerics for test-llava-runner-linux: https://github.com/pytorch/executorch/actions/runs/15386371381/job/43336641649?pr=10541

however, that test is known to segfault from time to time. rerunning it one more time to see if the output change persists.

@swolchok
Copy link
Contributor

swolchok commented Jun 3, 2025

@larryliu0820 are you the llava PoC? this diff appears to change numerics slightly but only for the llava test; should that be blocking?

@swolchok
Copy link
Contributor

swolchok commented Jun 3, 2025

hm, this really shouldn't change numerics; I'm pretty sure that torch::executor::optional and torch::executor::string_view are the std equivalents in all cases. we can verify that by sending an interim PR that forces the exec_aten types to be typedefs for the std types in all cases.

swolchok added a commit that referenced this pull request Jun 3, 2025
I'm seeing unexpected numerics changes on #10541. Doing this as an incremental step to make sure that the actual change to optional/string_view is not causing them.


ghstack-source-id: f8219a7
ghstack-comment-id: 2936633948
Pull-Request-resolved: #11321
swolchok added a commit that referenced this pull request Jun 4, 2025
…ons (#11321)

I'm seeing unexpected numerics changes on #10541. Doing this as an
incremental step to make sure that the actual change to
optional/string_view is not causing them.
@swolchok
Copy link
Contributor

OK, we landed #11321 , rebasing to see what CI has to say about that. (sorry for the delay; I was out for a couple days and am catching back up.)

@cyyever
Copy link
Contributor Author

cyyever commented Jun 11, 2025

@swolchok The current failures are unrelated

@swolchok
Copy link
Contributor

@swolchok The current failures are unrelated

I agree; I'll rerun them once test-llava-runner-linux (very slow, part of the same workflow) is done

@facebook-github-bot
Copy link
Contributor

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

@swolchok
Copy link
Contributor

nothing alarming showing up internally! merging.

@swolchok swolchok merged commit d719e8e into pytorch:main Jun 11, 2025
167 of 171 checks passed
@cyyever cyyever deleted the std_sv branch June 13, 2025 06:50
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. release notes: none Do not include this in the release notes topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants