Skip to content

Commit

Permalink
[VL] Disallow AVX-512 for simdjson by default
Browse files Browse the repository at this point in the history
  • Loading branch information
汪细勖(WangXixu)-顺丰科技技术集团 committed Feb 10, 2025
1 parent c90f170 commit 88de1bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/builddeps-veloxbe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ BUILD_BENCHMARKS=OFF
ENABLE_JEMALLOC_STATS=OFF
BUILD_VELOX_TESTS=OFF
BUILD_VELOX_BENCHMARKS=OFF
# Set to ON for machines have AVX-512 instruction.
SIMDJSON_AVX512_ALLOWED=OFF
ENABLE_QAT=OFF
ENABLE_IAA=OFF
ENABLE_HBM=OFF
Expand Down Expand Up @@ -124,6 +126,10 @@ do
BUILD_VELOX_BENCHMARKS=("${arg#*=}")
shift # Remove argument name from processing
;;
--simdjson_avx512_allowed=*)
SIMDJSON_AVX512_ALLOWED=("${arg#*=}")
shift # Remove argument name from processing
;;
--build_arrow=*)
BUILD_ARROW=("${arg#*=}")
shift # Remove argument name from processing
Expand Down Expand Up @@ -190,7 +196,7 @@ function build_velox {
./build_velox.sh --enable_s3=$ENABLE_S3 --enable_gcs=$ENABLE_GCS --build_type=$BUILD_TYPE --enable_hdfs=$ENABLE_HDFS \
--enable_abfs=$ENABLE_ABFS --build_test_utils=$BUILD_TESTS \
--build_tests=$BUILD_VELOX_TESTS --build_benchmarks=$BUILD_VELOX_BENCHMARKS --num_threads=$NUM_THREADS \
--velox_home=$VELOX_HOME
--velox_home=$VELOX_HOME --simdjson_avx512_allowed=$SIMDJSON_AVX512_ALLOWED
}

function build_gluten_cpp {
Expand Down
9 changes: 9 additions & 0 deletions ep/build-velox/src/build_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ENABLE_BENCHMARK=OFF
ENABLE_TESTS=OFF
# Set to ON for gluten cpp test build.
BUILD_TEST_UTILS=OFF
# Set to ON for machines have AVX-512 instruction.
SIMDJSON_AVX512_ALLOWED=OFF
# Number of threads to use for building.
NUM_THREADS=""

Expand Down Expand Up @@ -80,6 +82,10 @@ for arg in "$@"; do
ENABLE_BENCHMARK=("${arg#*=}")
shift # Remove argument name from processing
;;
--simdjson_avx512_allowed=*)
SIMDJSON_AVX512_ALLOWED=("${arg#*=}")
shift # Remove argument name from processing
;;
--num_threads=*)
NUM_THREADS=("${arg#*=}")
shift # Remove argument name from processing
Expand Down Expand Up @@ -123,6 +129,9 @@ function compile {
fi
if [ -n "${GLUTEN_VCPKG_ENABLED:-}" ]; then
COMPILE_OPTION="$COMPILE_OPTION -DVELOX_GFLAGS_TYPE=static"
if
if [ $SIMDJSON_AVX512_ALLOWED == "OFF" ]; then
COMPILE_OPTION="$COMPILE_OPTION -DSIMDJSON_AVX512_ALLOWED=OFF"
fi

COMPILE_OPTION="$COMPILE_OPTION -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
Expand Down

0 comments on commit 88de1bd

Please sign in to comment.