pytorch / pytorch/cpuinfo

[bazel] add support for platforms and toolchains (Bazel 8 compatibility)

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

Nobody has claimed this yet.

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

Description

I'm using Bazel 8 with bzlmod and pulled cpuinfo via Bazel Central Registy.

However, when I build my target that depends on cpuinfo for Android platforms, I get compile error in src/arm/mach/init.c which for some reason gets selected because my host machine is MacOS. I've tried the same on Linux but to no avail.

In general, all config_settings should be updated to use standard platforms

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 reviewing the Bazel configuration and all config_settings involved in selecting src/arm/mach/init.c, then compare them with the standard platforms definitions linked in the issue. Verify the behavior with Bazel 8, bzlmod, and an Android platform target; done means the correct platform-specific sources are selected without host-machine leakage.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.