Skip to content

Commit 6c305d5

Browse files
Jenkins-Jcs-zhang
andauthored
[GLUTEN-11906][VL] Support dynamic build for ppc64le (#11907)
Add support for building gluten on the ppc64le architecture Related: #11906 Signed-off-by: Chongshi Zhang <zhangcho@us.ibm.com> Co-authored-by: Chongshi Zhang <zhangcho@us.ibm.com>
1 parent f384947 commit 6c305d5

9 files changed

Lines changed: 45 additions & 7 deletions

File tree

cpp/velox/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
4747
set(SYSTEM_LIB_MULTIARCH_PATH
4848
"/usr/lib"
4949
CACHE PATH "System Lib MultiArch dir")
50+
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL ppc64le)
51+
set(SYSTEM_LIB_MULTIARCH_PATH
52+
"/usr/lib"
53+
CACHE PATH "System Lib MultiArch dir")
5054
else()
5155
message(FATAL_ERROR "Unsupported processor type: ${CMAKE_SYSTEM_PROCESSOR}")
5256
endif()

dev/build-helper-functions.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ function get_cxx_flags {
5555
CPU_ARCH="sse"
5656
elif [ "$MACHINE" = "aarch64" ]; then
5757
CPU_ARCH="aarch64"
58+
elif [ "$MACHINE" = "ppc64le" ]; then
59+
CPU_ARCH="ppc64le"
5860
fi
5961
fi
6062
fi
@@ -121,6 +123,10 @@ function get_cxx_flags {
121123
echo -n "-march=armv8-a+crc+crypto -std=c++20 $ADDITIONAL_FLAGS"
122124
fi
123125
;;
126+
127+
"ppc64le")
128+
echo -n "-mcpu=power10 -std=c++20 $ADDITIONAL_FLAGS"
129+
;;
124130
*)
125131
echo -n "Architecture not supported!"
126132
esac

dev/build-thirdparty.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function process_setup_ubuntu_2204 {
3838
function process_setup_centos_9 {
3939
cp /lib64/{libre2.so.9,libdouble-conversion.so.3,libevent-2.1.so.7,libdwarf.so.0,libicudata.so.67,libicui18n.so.67,libicuuc.so.67,libsodium.so.23} $THIRDPARTY_LIB/
4040
cp /usr/local/lib/{libboost_context.so.1.84.0,libboost_filesystem.so.1.84.0,libboost_program_options.so.1.84.0,libboost_regex.so.1.84.0,libboost_system.so.1.84.0,libboost_thread.so.1.84.0,libboost_atomic.so.1.84.0} $THIRDPARTY_LIB/
41-
cp /usr/local/lib64/{libgflags.so.2.2,libglog.so.1} $THIRDPARTY_LIB/
41+
cp /usr/local/lib64/{libgflags.so.2.2,libglog.so.1,libgeos.so.3.10.7} $THIRDPARTY_LIB/
4242
}
4343

4444
function process_setup_centos_8 {

dev/docker/Dockerfile.centos8-dynamic-build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ RUN set -ex; \
4343
./install-resources.sh 3.5; \
4444
./install-resources.sh 3.5-scala2.13; \
4545
./install-resources.sh 4.0; \
46-
if [ "$(uname -m)" = "aarch64" ]; then \
47-
export CPU_TARGET="aarch64"; \
46+
ARCH=$(uname -m); \
47+
if [[ "$ARCH" == "aarch64" || "$ARCH" == "ppc64le" ]]; then \
48+
export CPU_TARGET="$ARCH"; \
4849
fi; \
4950
cd /opt/gluten; \
5051
source /opt/rh/gcc-toolset-11/enable; \

dev/docker/Dockerfile.centos9-dynamic-build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ RUN set -ex; \
4141
./install-resources.sh 3.5; \
4242
./install-resources.sh 3.5-scala2.13; \
4343
./install-resources.sh 4.0; \
44-
if [ "$(uname -m)" = "aarch64" ]; then \
45-
export CPU_TARGET="aarch64"; \
44+
ARCH=$(uname -m); \
45+
if [[ "$ARCH" == "aarch64" || "$ARCH" == "ppc64le" ]]; then \
46+
export CPU_TARGET="$ARCH"; \
4647
fi; \
4748
cd /opt/gluten; \
4849
source /opt/rh/gcc-toolset-12/enable; \

dev/package.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ cd "$GLUTEN_DIR"
2727

2828
if [ "$ARCH" = "aarch64" ]; then
2929
export CPU_TARGET="aarch64"
30+
elif [ "$ARCH" = "ppc64le" ]; then
31+
export CPU_TARGET="ppc64le"
3032
fi
3133

3234
# build gluten with velox backend, prompt always respond y

ep/build-velox/src/build-velox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function compile {
155155
export Arrow_SOURCE=AUTO
156156
if [ $ARCH == 'x86_64' ]; then
157157
make $COMPILE_TYPE $NUM_THREADS_OPTS EXTRA_CMAKE_FLAGS="${COMPILE_OPTION}"
158-
elif [[ "$ARCH" == 'arm64' || "$ARCH" == 'aarch64' ]]; then
158+
elif [[ "$ARCH" == 'arm64' || "$ARCH" == 'aarch64' || "$ARCH" == "ppc64le" ]]; then
159159
CPU_TARGET=$ARCH make $COMPILE_TYPE $NUM_THREADS_OPTS EXTRA_CMAKE_FLAGS="${COMPILE_OPTION}"
160160
else
161161
echo "Unsupported arch: $ARCH"

ep/build-velox/src/get-velox.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ function setup_linux {
197197
elif [[ "$LINUX_DISTRIBUTION" == "rhel" ]]; then
198198
case "$LINUX_VERSION_ID" in
199199
9.6) ;;
200+
9.7) ;;
200201
*)
201-
echo "Unsupported openEuler version: $LINUX_VERSION_ID"
202+
echo "Unsupported rhel version: $LINUX_VERSION_ID"
202203
exit 1
203204
;;
204205
esac

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,5 +2234,28 @@
22342234
<os.full.name>${platform}_${arch}</os.full.name>
22352235
</properties>
22362236
</profile>
2237+
<profile>
2238+
<id>linux-ppc64le</id>
2239+
<activation>
2240+
<os>
2241+
<family>Linux</family>
2242+
<arch>ppc64le</arch>
2243+
</os>
2244+
</activation>
2245+
<properties>
2246+
<platform>linux</platform>
2247+
<arch>ppc64le</arch>
2248+
<os.full.name>${platform}_${arch}</os.full.name>
2249+
</properties>
2250+
</profile>
2251+
<profile>
2252+
<id>disaggregated-shuffle</id>
2253+
<activation>
2254+
<activeByDefault>false</activeByDefault>
2255+
</activation>
2256+
<modules>
2257+
<module>gluten-disaggregated-shuffle</module>
2258+
</modules>
2259+
</profile>
22372260
</profiles>
22382261
</project>

0 commit comments

Comments
 (0)