-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Description: When I preload libalm.so from AOCL LibM and run Python, I see warnings related to numpy.finfo for float32:
UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.This does not happen when AOCL LibM is not preloaded.
Steps to Reproduce:
- LD_PRELOAD=./amd-libm-gcc/lib/libalm.so python
- In Python:
import numpy as np;print(np.finfo(np.float32)) Observed Behavior:
smallest_subnormal is reported as 0.0 instead of the expected 1.401298e-45.
Warnings appear in numpy/_core/getlimits.py.
Expected Behavior:
smallest_subnormal should match IEEE 754 for float32.
Environment:
Python 3.14 (free-threading build)
NumPy version: 2.3.5
AOCL LibM version: 5.1
OS: AlmaLinux release 8.4
Additional Notes:
Without AOCL LibM preloaded, the warnings do not occur.
This might indicate an issue with how AOCL LibM handles floating-point constants or environment setup.
This issue does not occur in builds for AOCL 4.2.0 and 5.0.0.
Observed only with AOCL 5.1