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

Build with SSE4 / AVX, fix build artifact generation #5651

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

sturnclaw
Copy link
Member

This PR does a wee refactor of our Linux build scripts to ensure we're correctly generating and uploading release artifacts. It moves the release generation steps into a reusable action file, which is important for the other half of the PR.

This PR enables SSE4.2 support by default for our Linux x64 build type. SSE4.2 has been available and supported in mainstream x86/64 processors for over a decade now, so it makes sense to formally require SSE >= 4.2 for our builds (and allow the compiler to perform automatic optimization and vectorization to take advantage of these instruction sets).

GCC's documentation doesn't specify whether I need to manually add all of the SSE version flags or if -msse4.2 implies previous SSE versions. If someone is more familiar with the semantics GCC provides I'd appreciate your feedback / review. 😄

This PR also adds an optional x64 build type with AVX2 enabled. AVX2 has 256-bit-wide SIMD instructions compared to SSE's 128-bit-wide SIMD, and has been supported in most mainstream Intel desktop and laptop CPUs since 2013 (2015 for AMD CPUs). The only reason this hasn't been enabled by default is that there are a number of laptops with Intel Pentium and Celeron "mobile" CPUs which do not provide AVX2 hardware.

Generally, laptops with those "mobile" processors do not have the graphical capability to run Pioneer well, as the integrated GPU is very low-power and they're usually not paired with a discrete GPU of any kind. However, I intend to keep AVX2 an "optional" build type until we've established that it's not affecting our userbase and we can provide a good failure-case UX when a user tries to run Pioneer on a non-AVX2 CPU.

@sturnclaw
Copy link
Member Author

Yes, I see the build failure... Github Actions is very finicky about certain things. Will come back to this tomorrow.

@sturnclaw sturnclaw merged commit 7b2e475 into pioneerspacesim:master Nov 21, 2023
@sturnclaw sturnclaw deleted the build-avx branch November 21, 2023 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant