[1/N] Change C-style casts to static_cast or reinterpret_cast#165750
[1/N] Change C-style casts to static_cast or reinterpret_cast#165750cyyever wants to merge 7 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/165750
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: ❌ 1 New FailureAs of commit deba160 with merge base 15ff1cd ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Skylion007
left a comment
There was a problem hiding this comment.
GitHub kept erroring my leaving inline comments. Some of the static casts from std::string.data to char cast, are they really necessary?
Some of the reinterpret casts should be const casts, which are bit safer.
Also slight nit: I noticed unique_devices set checks for membership before insertion. I think you can just call.Insert on it and it will be a noop if the key is present and return an std::pair where the second value tells you if it succeeded or not.
e9e257f to
0e217cc
Compare
|
@Skylion007 Applied your advices. |
|
@pytorchbot merge -r |
|
@pytorchbot revert -m "Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable" -c autorevert This PR is attributed to have caused regression in:
Please investigate and fix the issues. |
|
@pytorchbot successfully started a revert job. Check the current status here. |
|
@cyyever your PR has been successfully reverted. |
…#165750)" This reverts commit e1e8491. Reverted #165750 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](#165750 (comment)))
…h#165750) This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: pytorch#165750 Approved by: https://github.com/Skylion007
|
I think this revert is wrong, the failures are probably due to the AWS outage instead |
|
@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 -f "invalid revert by pytorch-auto-revert bot " |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…h#165750) This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: pytorch#165750 Approved by: https://github.com/Skylion007
…pytorch#165750)" This reverts commit e1e8491. Reverted pytorch#165750 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#165750 (comment)))
…h#165750) This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: pytorch#165750 Approved by: https://github.com/Skylion007
…h#165750) This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: pytorch#165750 Approved by: https://github.com/Skylion007
…pytorch#165750)" This reverts commit e1e8491. Reverted pytorch#165750 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#165750 (comment)))
…h#165750) This series of changes try to cover C style casts into C++ alternatives. Pull Request resolved: pytorch#165750 Approved by: https://github.com/Skylion007
A follow-up of #165750 to clean up C casts. Pull Request resolved: #165891 Approved by: https://github.com/Skylion007 Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
A follow-up of #165750 to clean up C casts. Pull Request resolved: #165891 Approved by: https://github.com/Skylion007 Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
This series of changes try to cover C style casts into C++ alternatives.
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci