rusty1s / pytorch_spline_conv

Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch
https://arxiv.org/abs/1711.08920
MIT License
172 stars 36 forks source link

GLIBC incompatibility issue on RHEL8 #44

Closed DanaBCooper closed 1 year ago

DanaBCooper commented 1 year ago

When running on RHEL8, installing a torch-spline-conv cpu binary and attempting to import it causes a failure due to GLIBC 2.29. It's not clear which other wheels are affected by this issue

Minimal replication instructions

In a new venv run:
python3 -m pip install torch-spline-conv==1.2.2+pt20cpu -f https://data.pyg.org/whl/torch-2.0.1+cpu.html --force-reinstall --no-cache-dir

Navigate to site-packages/torch-spline-conv

objdump -T _basis_cpu.so | grep pow
Will show a dependency on GLIBC 2.29
(alternatively to manually inspecting .so files, install a compatible version of torch and run import torch_spline_conv to cause the error)

This is due to the optimised version of pow added in GLIBC 2.29, presumably used in the compilation of the wheel. This can be verified by running objump -T on the _basis_cpu.so produced.

Using this optimised pow (pow has been present since 2.25, just less optimised) breaks compatibility on RHEL8. Does this package not support RHEL8, or is it possible the wheels could be rebuilt with backward compatibility?

This stackoverflow question describes how it could be done - https://stackoverflow.com/questions/77000590/referencing-stdpow-requires-glibc2-29

rusty1s commented 1 year ago

Oh, wow. This is an amazing catch, thank you :) Let me try to fix it.

rusty1s commented 1 year ago

Fixed via https://github.com/rusty1s/pytorch_spline_conv/pull/45

inkandvijay commented 11 months ago

Similar issue with RHEL 7.1 (Using Developer Toolset-9.0)

Facing the same issue, details below:

Environment

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install torch_geometric
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.1.0+cu118.html

Complete Error:

/home/../miniconda3/envs/pyg/lib/python3.11/site-packages/torch_geometric/typing.py:90: UserWarning: An issue occurred while importing 'torch-spline-conv'. Disabling its usage. Stacktrace: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/../miniconda3/envs/pyg1lib/python3.11/site-packages/torch_spline_conv/_basis_cuda.so)
  warnings.warn(
rusty1s commented 11 months ago

There seems to be another issue that in the CUDA code path that powf requires GLIB_2.27. Need to take a look.

rusty1s commented 11 months ago

Fixed.