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

internal/cpu: should detect AVX512 #26505

Closed
templexxx opened this issue Jul 20, 2018 · 8 comments
Closed

internal/cpu: should detect AVX512 #26505

templexxx opened this issue Jul 20, 2018 · 8 comments
Labels
FeatureRequest FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@templexxx
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.11beta2

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

darwin amd64

What did you do?

I want to run AVX512 instructions after detect cpu feature ( go1.11 have AVX512 instructions in anames.go)

What did you expect to see?

internal/cpu tells me whether I have AVX512 support or not

What did you see instead?

nothing about AVX512 there

I have wrote codes about detect AVX512, maybe should I contribute it?

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

CC: @randall77 @tklauser @aead

Do you mean x/sys/cpu instead of internal/cpu? (If this is for something internal to the runtime or standard library, please include a cross-reference to whatever issue it's for.)

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest labels Jul 20, 2018
@bcmills bcmills added this to the Unplanned milestone Jul 20, 2018
@templexxx
Copy link
Contributor Author

I mean internal/cpu

for example:

in crypto/sha1/sha1block_amd64.go line:15:
var useAVX2 = cpu.X86.HasAVX2 && cpu.X86.HasBMI1 && cpu.X86.HasBMI2

how about add HasAVX512 under X86?

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

HasAVX512 is only useful in internal/cpu if something else in the standard library is going to use it: nothing else is allowed to import internal/cpu or depend on its contents.

What specific changes in the standard library do you want to use it in?

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

(CC @FiloSottile for crypto/)

@templexxx
Copy link
Contributor Author

like xor in crypto/cipher

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

If we decide that such a change is worthwhile, presumably we would add the corresponding support to internal/cpu at the same time (for the same issue or even in the same CL).

I don't think we should add to internal/cpu without a concrete change we're going to use it in.

@bcmills bcmills added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 20, 2018
@templexxx
Copy link
Contributor Author

that make sense, thank you for your reply

@bcmills
Copy link
Contributor

bcmills commented Jul 20, 2018

Ok. I'll close this for now, but it's certainly something we can consider when we have a concrete use for it.

@bcmills bcmills closed this as completed Jul 20, 2018
@golang golang locked and limited conversation to collaborators Jul 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants