Skip to content

Conversation

@giordano
Copy link
Member

Alternative to #6. This one is based on libLLVM and doesn't require extra packages

Comment on lines +213 to +215
if VERSION < v"1.4"
error("Cannot automatically detect the features of the CPU with this version of Julia!")
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go by this route, all the microarchitecture stuff will work only with Julia v1.4+, as this requires libllvm v8+. Not too bad since the alternative would be to have some code in Base to do the same, but that would require Julia v1.6 or more.

Comment on lines +239 to +240
@warn "Cannot determine the microarchitecture for the given set of features!"
return nothing
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want a hard failure if we can't determine the microarchitecture from the given set of features, but it's better to issue a warning just in case we're we're getting strange results. Also, this function would need to be used only when we're asking the set of features for an architecture we know we support (currently only x86_64), as done below in extended_platform_key_abi

@giordano
Copy link
Member Author

Trying to collect what LLVMGetHostCPUFeatures returns on some aarch64 machines. AWS Graviton 2 (should have Neoverse N1 chips), Travis CI (according to https://docs.travis-ci.com/user/reference/overview/ "LXD compliant OS images for arm64 are run in Packet", no more details), and Cloud Drone (which according to https://blog.drone.io/drone-cloud/ and https://www.packet.com/cloud/servers/c1-large-arm/ use Cavium ThunderX CPUs, without further details) all give:

["+neon", "+fp-armv8", "+crypto", "+crc"]

Thanks to @ianshmean for the collaboration!

@giordano giordano force-pushed the mg/llvm-cpu-features branch from 98ec902 to 491d807 Compare June 29, 2020 00:57
@giordano
Copy link
Member Author

Superseded by #38

@giordano giordano closed this Sep 24, 2020
@giordano giordano deleted the mg/llvm-cpu-features branch September 24, 2020 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant