pytorch / cpuinfo

CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
BSD 2-Clause "Simplified" License
990 stars 310 forks source link

Improve Windows Unicode support #141

Closed richard-townsend-arm closed 1 year ago

richard-townsend-arm commented 1 year ago

This PR adds support for the Snapdragon Compute Platform used in the Windows Dev Kit 2023 (aka Project Volterra). It also fixes an issue that showed up when enumerating the cache structures and improves string handling to work even if the UTF-16 UNICODE header is set. Please take a look.

facebook-github-bot commented 1 year ago

Hi @richard-townsend-arm!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Blackhex commented 1 year ago

Please take a look also on this PR #144. We can somewhat merge them together...

richard-townsend-arm commented 1 year ago

@Blackhex: let's proceed with merging your PR (#144) and refocus this one on Unicode support.

One major omission from this PR is the ability to handle unknown / future CPUs (it'd be good to fall back to an "Unknown CPU" value if we can), as well as Hyper-V. It's proving slow to get the revisions to this PR approved inside Arm.

Blackhex commented 1 year ago

@richard-townsend-arm Is this what you had in mind https://github.com/pytorch/cpuinfo/pull/144/commits/4aa1525ae0402e5138df7d9d82f5eca226c48dd4 ? It still fails the tests for unknown registry value but at least they don't crash on access violation or similar...

richard-townsend-arm commented 1 year ago

Hi folks, apologies it's taken me a little while to follow up on this one - this PR is now exclusively about wide character support. I see the CLA bot is still unhappy (will chase up on that), in the meantime PTAL.

richard-townsend-arm commented 1 year ago

Hi @Maratyszcza: any feedback on this latest iteration?