Skip to content

Conversation

@kulinseth
Copy link
Contributor

No description provided.

@kulinseth
Copy link
Contributor Author

@malfet ping for review.

Copy link
Contributor

@Maratyszcza Maratyszcza left a comment

Choose a reason for hiding this comment

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

Use lower-case for variable names, i.e. has_feat_lse instead of has_FEAT_LSE

Copy link
Contributor

@Maratyszcza Maratyszcza left a comment

Choose a reason for hiding this comment

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

Please use lowercase variable names (i.e. has_feat_lse rather than has_FEAT_LSE). Other than that, the PR LGTM.

@kulinseth kulinseth force-pushed the pr/use-isa-sysctls branch from 93ffb48 to 0d22fdf Compare July 25, 2022 18:46
@Maratyszcza Maratyszcza merged commit 503937b into pytorch:master Jul 25, 2022
@Maratyszcza
Copy link
Contributor

Thank you!

megengine-bot pushed a commit to MegEngine/cpuinfo that referenced this pull request Sep 5, 2022
…rt. (pytorch#100)

* Use sysctls available in macOS 12 / iOS 15 for hardware feature support.

Co-authored-by: Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com>
GitOrigin-RevId: 503937b
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ne fails

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.

Before this change, on MacBook:

    $ cpu-info
    ...
    Warning (cpuinfo): parsing "hw.machine" failed
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Warning (cpuinfo): parsing "hw.machine" failed
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 (described as "Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent refactoring in pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked *before* attempting
to decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Warning (cpuinfo): parsing "hw.machine" failed
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request May 22, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request Jun 17, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request Nov 27, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request Dec 4, 2024
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
dlenski added a commit to dlenski/cpuinfo that referenced this pull request Jan 2, 2025
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
bunnitha pushed a commit to bunnitha/open-cpuinfo that referenced this pull request Jun 27, 2025
…ding hw.machine

This functionality was implemented in pytorch#65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent pytorch#100, probably inadvertently.

Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions.  I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.

Before this change, on a recent MacBook Pro:

    $ cpu-info
    ...
    Debug (cpuinfo): hw.machine: arm64
    Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
    ...
    Packages:
    	0:

After this change:

    $ cpu-info
    ...
    Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
    ...
    Packages:
    	0: Apple M2 Pro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants