-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove default CPU_TARGET=avx #10346
Conversation
✅ Deploy Preview for meta-velox canceled.
|
dfb145f
to
879be49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
case $CPU_ARCH in | ||
|
||
"arm64") | ||
echo -n "-mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden $ADDITIONAL_FLAGS" | ||
echo -n "-mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not need -fvisibility-inlines-hidden
being added here? It was previously present to avoid log flooding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the log messages after removing that. We need to evaluate and specify -fvisibility=hidden
and -fvisibility-inlines-hidden
for both clang and gcc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My one concern with this change is that we cannot force builds to use a particular architecture (for e.g you want an SSE only build) - This is sometimes required for e.g if you want to create portable binaries that may need to run on machines that dont have avx.
.github/workflows/docker.yml
Outdated
@@ -46,16 +46,14 @@ jobs: | |||
include: | |||
- name: Check | |||
file: "scripts/check-container.dockfile" | |||
args: "cpu_target=avx" | |||
tags: "ghcr.io/facebookincubator/velox-dev:check-avx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename the tag to check from check-avx then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
scripts/setup-helper-functions.sh
Outdated
if [[ $CPU_CAPABILITIES =~ "avx" ]]; then | ||
if [ "$OS" = "Darwin" ]; then | ||
if [ "$MACHINE" = "arm64" ]; then | ||
CPU_ARCH="arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that mac's with cpu's that dont support avx are not supported anymore ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mac is used by developers and most of them are either on newer ARM64 or the older x86_64 with avx support.
Avx in both Intel and AMD was first available in 2011. We should be safe with the assumption that avx is always available for macs with x86_64.
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fair - just wanted to confirm.
scripts/ubuntu-22.04-cpp.dockerfile
Outdated
@@ -32,6 +29,8 @@ ADD scripts /velox/scripts/ | |||
# are required to avoid tzdata installation | |||
# to prompt for region selection. | |||
ARG DEBIAN_FRONTEND="noninteractive" | |||
# Set a default timezone, can be overriden via ARG | |||
ARG tz="Europe/Madrid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we set Europe/Madrid in first place ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jacob added this file and he set Europe as the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think its safe to remove this or maybe set it to UTC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot remove the default arg. Ubuntu tzdata requires this as mentioned in the comment above.
I changed the default to Etc/UTC
.
Reference https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
@kgpai as mentioned in the other comment, avx has been available since a long time now. I doubt there is a use case to build only for sse. |
We can always add the CPU_TARGET back if there is a use for it. |
@majetideepak Should we also change the documentation as part of this change (The README still refers to this ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (one minor nit though).
@pedroerp has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
The default should be empty so that the CPU_TARGET/CPU_ARCH will be inferred.
Remove SSE support for macos as developers are mostly on Intel avx or Apple arm.