pytorch / pytorch/cpuinfo

cpuinfo_get_current_core() return NULL on mac (intel chip)

Open
#106 1 comment 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

  • OS: macOSX 12.4
(base) ➜  cpuinfo git:(master) uname -a
Darwin ZZ-MBP.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
  • cpuinfo commit:
    * 5e63739 2022-07-18 | Add bazel support for iOS arm64 simulator (#105) (HEAD -> master, origin/master, origin/HEAD) [Keith 
     Smiley]
    
  • Reproduce
#include <stdio.h>
#include "cpuinfo.h"

int main()
{
    cpuinfo_initialize();

    const cpuinfo_core* core = cpuinfo_get_current_core();
    printf("core is %p\n", core);

    cpuinfo_deinitialize();

    return 0;
}
  • Expected behaviour
    The print value of core should be not "0x0"
  • The actual output
core is 0x0

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

Start by running the provided cpuinfo_get_current_core() reproducer on macOS 12.4 with an Intel chip, then trace the macOS x86_64 path used by that entry point. Done means cpuinfo_initialize() followed by cpuinfo_get_current_core() returns a non-NULL core pointer in this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.