Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraints for CPU features? #13

Open
yesudeep opened this issue Jul 21, 2020 · 2 comments
Open

Constraints for CPU features? #13

yesudeep opened this issue Jul 21, 2020 · 2 comments
Labels
feature request P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee)

Comments

@yesudeep
Copy link

yesudeep commented Jul 21, 2020

Hi. Would it be possible to detect CPU features using something
like https://github.com/google/cpu_features/
and provide them as platform constraints?

This could help in enabling certain compiler flags and instruction set
architectures for targets.

What needs to be done so that something like this would work
with Bazel?

@aiuto
Copy link
Contributor

aiuto commented Apr 11, 2022

I'm not inclined to go down this path. It is never ending. Perhaps the X86 space is mostly stable, but the ARM space is growing all the time. Many people take the ARM core and add other pieces they need on the die. They should be able to innovate without having everything enumerated in platforms.

In general, micro level distinguishers should be provided by the compiler toolchains.

@aiuto aiuto added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) feature request and removed untriaged labels Apr 11, 2022
@aiuto aiuto removed their assignment Apr 11, 2022
@rickeylev
Copy link

Over in Python land, there's 4 different prebuilt interpreters available that vary by micro arch: a generic one, and then 3 that target some different micro archs. These docs talk about them: https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions:~:text=Intel/AMD%20CPUs.-,x86_64_v2,-%2D*

So, perhaps you'd reconsider having those micro archs here in the platforms repo? If not, perhaps another lighter weight place?

In general, micro level distinguishers should be provided by the compiler toolchains.

That seems rather expensive in this case, though. The binaries are prebuilt, so a compiler toolchain isn't necessarily required. It would also mean the compiler repos would have to be downloaded even if they weren't used -- during toolchain resolution, the constraint has to be evaluated, which then would download that compiler repo, only to have it not match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
Projects
None yet
Development

No branches or pull requests

4 participants