You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Linking libpng throws an error libonnxruntime-genai.so: undefined reference to 'png_init_filter_functions_vsx' when building onnxruntime-genai (v0.7.0) using python3 build.py --ort_home=/onnxruntime-genai/ort --cmake_generator Ninja --parallel --config Release:
I do not have access to an ARM or x86 system, but I would assume on those systems it would try to link against png_init_filter_functions_neon or png_init_filter_functions_avx (or avx2/avx512)
To Reproduce
Steps to reproduce the behavior:
Probably difficult as you won't have a Power System 😅
However my build script looks roughly like this:
ARCH=ppc64le #x86_64 for intel, aarch64 for arm...
docker run -ti --rm quay.io/pypa/manylinux_2_28_${ARCH}:2024.11.23-1
git clone -b v0.7.0 https://github.com/microsoft/onnxruntime-genai &&cd onnxruntime-genai
mkdir ort &&cd ort
# I manually build onnxruntime1.20.1 before which I copy in here
cp /tmp/onnxruntime-linux-ppc64le-v1.20.1.tgz .
tar -xvf onnxruntime-linux-ppc64le-v1.20.1.tgz
mv onnxruntime-linux-ppc64le-v1.20.1/include .
mv onnxruntime-linux-ppc64le-v1.20.1/lib .export PATH=/opt/python/cp310-cp310/bin:$PATH# Seems cmake==4.0.0 is too new?
pip3 install --prefer-binary --extra-index-url https://repo.fury.io/mgiessing "cmake<4" requests ninja
python3 build.py --ort_home=/onnxruntime-genai/ort --cmake_generator Ninja --parallel --config Release
Everything runs through until the linking is failing
Expected behavior
I'd expect to build properly
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Almalinux8 (manylinux_2_28 pypi image to built glibc 2.28 compliant wheels)
Version onnxruntime-genai v0.7.0
Additional context
Interstingly I can make this work if I just "disable" the powerpc intrinsics (VSX) by changing the following flag in build/Linux/Release/_deps/dlib-src/dlib/external/libpng/pngpriv.h and rebuild:
Describe the bug
Linking libpng throws an error
libonnxruntime-genai.so: undefined reference to 'png_init_filter_functions_vsx'
when building onnxruntime-genai (v0.7.0) usingpython3 build.py --ort_home=/onnxruntime-genai/ort --cmake_generator Ninja --parallel --config Release
:I do not have access to an ARM or x86 system, but I would assume on those systems it would try to link against
png_init_filter_functions_neon
orpng_init_filter_functions_avx
(or avx2/avx512)To Reproduce
Steps to reproduce the behavior:
Probably difficult as you won't have a Power System 😅
However my build script looks roughly like this:
Everything runs through until the linking is failing
Expected behavior
I'd expect to build properly
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Interstingly I can make this work if I just "disable" the powerpc intrinsics (VSX) by changing the following flag in
build/Linux/Release/_deps/dlib-src/dlib/external/libpng/pngpriv.h
and rebuild:[...] # define PNG_POWERPC_VSX_IMPLEMENTATION 1 [...]
to
[...] # define PNG_POWERPC_VSX_IMPLEMENTATION 0 [...]
The text was updated successfully, but these errors were encountered: