pytorch / pytorch/cpuinfo

hwcap on aarch64 linux is 64bit

Open
#192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
1.2k
Forks
409
PR merge metrics
No merged PRs in 30d

Description

hwcap and hwcap2 are 64bit values on arm64 linux so consistently using uint32_t for it is wrong.

(top 32bit of hwcap is reserved for libc use so may not be relevant for cpuinfo, but hwcap2 is 64bit and top bits are already in use.)

https://elixir.bootlin.com/linux/latest/source/arch/arm64/include/uapi/asm/hwcap.h

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the Linux arm64 hwcap definition linked in the issue, then locate the cpuinfo code that stores or reads hwcap and hwcap2. Done means those values are handled as 64-bit on aarch64 Linux without breaking existing platforms; the payload names no tests, so identify the relevant validation while working.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.