Skip to content

Commit

Permalink
fix symbol hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Oct 27, 2023
1 parent ea1b93f commit f48972c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/distro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ jobs:
pip install cibuildwheel
export PIP_FIND_LINKS="https://makslevental.github.io/wheels https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"
export PIP_FIND_LINKS="https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"
BOOST_ROOT="${{ steps.install-boost.outputs.BOOST_ROOT }}" \
CIBW_ARCHS=${{ matrix.ARCH }} \
CMAKE_GENERATOR="Ninja" \
HOST_CCACHE_DIR=${{ steps.configure_ccache_dir_on_host.outputs.HOST_CCACHE_DIR }} \
MATRIX_OS=${{ matrix.OS }} \
MLIR_WHEEL_VERSION="17.0.0.2023092813+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102602+bdd3c4be" \
MLIR_WHEEL_VERSION="17.0.0.2023102703+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102707+7d51a5c8" \
PARALLEL_LEVEL=${{ matrix.OS == 'windows-2019' && '2' || '4' }} \
cibuildwheel --output-dir wheelhouse
Expand All @@ -135,11 +135,11 @@ jobs:
sudo apt-get install -y python3-dev
export PIP_FIND_LINKS="https://makslevental.github.io/wheels https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"
export PIP_FIND_LINKS="https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"
export PIP_NO_BUILD_ISOLATION="false"
export CIBW_ARCHS=${{ matrix.ARCH }}
export MLIR_WHEEL_VERSION="17.0.0.2023092813+35ca6498"
export MLIR_AIE_WHEEL_VERSION="0.0.1.2023102602+bdd3c4be"
export MLIR_WHEEL_VERSION="17.0.0.2023102703+35ca6498"
export MLIR_AIE_WHEEL_VERSION="0.0.1.2023102707+7d51a5c8"
export BOOST_ROOT="${{ steps.install-boost.outputs.BOOST_ROOT }}"
export MATRIX_OS=${{ matrix.OS }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ jobs:
cp requirements.txt python_bindings
pushd python_bindings
PIP_FIND_LINKS="https://makslevental.github.io/wheels https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels" \
PIP_FIND_LINKS="https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels" \
BOOST_ROOT=${{ steps.install-boost.outputs.BOOST_ROOT }} \
CIBW_ARCHS=${{ matrix.ARCH }} \
CIBW_BUILD="${{ matrix.PY_VERSION }}-*" \
CMAKE_GENERATOR="Ninja" \
HOST_CCACHE_DIR=${{ steps.configure_ccache_dir_on_host.outputs.HOST_CCACHE_DIR }} \
MATRIX_OS=${{ matrix.OS }} \
MLIR_WHEEL_VERSION="17.0.0.2023092813+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102602+bdd3c4be" \
MLIR_WHEEL_VERSION="17.0.0.2023102703+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102707+7d51a5c8" \
MLIR_AIR_WHEEL_VERSION=${{ inputs.MLIR_WHEEL_VERSION }} \
PARALLEL_LEVEL=2 \
cibuildwheel --output-dir ../wheelhouse
Expand Down Expand Up @@ -154,15 +154,15 @@ jobs:
cp requirements.txt python_bindings
pushd python_bindings
PIP_FIND_LINKS="https://makslevental.github.io/wheels https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels" \
PIP_FIND_LINKS="https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels" \
BOOST_ROOT=${{ steps.install-boost.outputs.BOOST_ROOT }} \
CIBW_ARCHS=${{ matrix.ARCH }} \
CIBW_BUILD="${{ matrix.PY_VERSION }}-*" \
CMAKE_GENERATOR="Ninja" \
HOST_CCACHE_DIR=${{ steps.configure_ccache_dir_on_host.outputs.HOST_CCACHE_DIR }} \
MATRIX_OS=${{ matrix.OS }} \
MLIR_WHEEL_VERSION="17.0.0.2023092813+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102602+bdd3c4be" \
MLIR_WHEEL_VERSION="17.0.0.2023102703+35ca6498" \
MLIR_AIE_WHEEL_VERSION="0.0.1.2023102707+7d51a5c8" \
MLIR_AIR_WHEEL_VERSION=${{ inputs.MLIR_WHEEL_VERSION }} \
PARALLEL_LEVEL=2 \
cibuildwheel --output-dir ../wheelhouse
Expand Down
4 changes: 4 additions & 0 deletions python_bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def build_extension(self, ext: CMakeExtension) -> None:
f"-DPython3_EXECUTABLE={sys.executable}",
# not used on MSVC, but no harm
f"-DCMAKE_BUILD_TYPE={cfg}",
# prevent symbol collision that leads to multiple pass registration and such
"-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON",
"-DCMAKE_C_VISIBILITY_PRESET=hidden",
"-DCMAKE_CXX_VISIBILITY_PRESET=hidden",
]
if platform.system() == "Windows":
cmake_args += [
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pybind11[global]>=2.10.4
setuptools>=42
wheel

-f https://makslevental.github.io/wheels
-f https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels

mlir-native-tools==17.0.0.2023092813+35ca6498
mlir==17.0.0.2023092813+35ca6498
mlir-aie==0.0.1.2023102602+bdd3c4be
mlir-native-tools==17.0.0.2023102703+35ca6498
mlir==17.0.0.2023102703+35ca6498
mlir-aie==0.0.1.2023102707+7d51a5c8
6 changes: 3 additions & 3 deletions scripts/build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if [ ! -d mlir-air ]; then
git clone --recursive https://github.com/Xilinx/mlir-air.git
fi

export MLIR_WHEEL_VERSION="17.0.0.2023092813+35ca6498"
export MLIR_AIE_WHEEL_VERSION="0.0.1.2023102602+bdd3c4be"
export MLIR_WHEEL_VERSION="17.0.0.2023102703+35ca6498"
export MLIR_AIE_WHEEL_VERSION="0.0.1.2023102707+7d51a5c8"

if [ "$machine" == "linux" ]; then
export CIBW_ARCHS=${CIBW_ARCHS:-x86_64}
Expand All @@ -40,7 +40,7 @@ ccache --print-stats
ccache --show-config

export HOST_CCACHE_DIR="$(ccache --get-config cache_dir)"
export PIP_FIND_LINKS="https://makslevental.github.io/wheels https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"
export PIP_FIND_LINKS="https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-wheels"

if [ x"$CIBW_ARCHS" == x"aarch64" ] || [ x"$CIBW_ARCHS" == x"arm64" ]; then
pip install -r $HERE/../requirements.txt
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def build_extension(self, ext: CMakeExtension) -> None:
"-DMLIR_DETECT_PYTHON_ENV_PRIME_SEARCH=ON",
# not used on MSVC, but no harm
f"-DCMAKE_BUILD_TYPE={cfg}",
# prevent symbol collision that leads to multiple pass registration and such
"-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON",
"-DCMAKE_C_VISIBILITY_PRESET=hidden",
"-DCMAKE_CXX_VISIBILITY_PRESET=hidden",
]
if platform.system() == "Windows":
cmake_args += [
Expand Down

0 comments on commit f48972c

Please sign in to comment.