This is an automated email from the ASF dual-hosted git repository.
yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 39c49d832 [VL] Speed up Arrow compile on Unity (#6426)
39c49d832 is described below
commit 39c49d832e60516b1b5a84d9a47d8bdbe3bf86ea
Author: Jin Chengcheng <[email protected]>
AuthorDate: Fri Jul 12 16:49:20 2024 +0800
[VL] Speed up Arrow compile on Unity (#6426)
---
dev/build_arrow.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dev/build_arrow.sh b/dev/build_arrow.sh
index 897dfcd26..d6606341a 100755
--- a/dev/build_arrow.sh
+++ b/dev/build_arrow.sh
@@ -64,6 +64,21 @@ function build_arrow_cpp() {
function build_arrow_java() {
ARROW_INSTALL_DIR="${ARROW_PREFIX}/install"
+ # set default number of threads as cpu cores minus 2
+ if [[ "$(uname)" == "Darwin" ]]; then
+ physical_cpu_cores=$(sysctl -n hw.physicalcpu)
+ ignore_cores=2
+ if [ "$physical_cpu_cores" -gt "$ignore_cores" ]; then
+ NPROC=${NPROC:-$(($physical_cpu_cores - $ignore_cores))}
+ else
+ NPROC=${NPROC:-$physical_cpu_cores}
+ fi
+ else
+ NPROC=${NPROC:-$(nproc --ignore=2)}
+ fi
+ echo "set cmake build level to ${NPROC}"
+ export CMAKE_BUILD_PARALLEL_LEVEL=$NPROC
+
pushd $ARROW_PREFIX/java
# Because arrow-bom module need the -DprocessAllModules
mvn versions:set -DnewVersion=15.0.0-gluten -DprocessAllModules
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]