| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Make Intel's ICX compiler working |
| Date: | 2026-03-11 18:10:55 |
| Message-ID: | abGwL2hIerWw3pEu@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Mar 11, 2026 at 11:08:01AM -0400, Andres Freund wrote:
> Hi,
>
> On 2026-03-11 14:44:11 +0000, Bertrand Drouvot wrote:
> > After having worked on [1], I tried to make use of the Intel's ICX compiler [2].
>
> Why? We removed icc support because it was barely maintained and buggy. Why
> would we expect ICX to be different? What would we gain by supporting what is
> essentially an LLVM fork?
>
>
> > The reason is that ICX defaults to -fp-model=fast enabling unsafe floating-point
> > optimizations (see [4]).
>
> That alone makes me extremely hesitant to support it. If a compiler vendor
> thinks defaulting to generating wrong results is a sane idea, I don't trust
> them.
Good point.
> > 2/ Issue on ICX's default runtime libraries
> >
> > For example, I was observing:
> >
> > postgres: postgres regression [local] CREATE SUBSCRIPTION: Relink
> > `/opt/intel/oneapi/compiler/2025.3/lib/libimf.so' with `/lib/x86_64-linux-gnu/libm.so.6' for IFUNC symbol `cosf'
> >
> > followed by a SIGSEGV.
> >
> > The reason is that ICX by default links against Intel runtime libraries such as
> > libimf.so, which provide IFUNC-based replacements for standard math functions (e.g.
> > cosf). When shared libraries built with ICX are loaded into a process that
> > also uses the system libm.so.6, the dynamic linker encounters conflicting
> > IFUNC resolvers and segfaults.
> >
> > The issue is solved by making use of -no-intel-lib ([7]).
>
> So their runtime is too buggy to be used as well.
> > I think that it makes sense to have ICX working (we took care of ICC in the past),
> > so PFA, a patch implementing those changes for both autoconf and meson.
>
> -many without some very very very good reasons.
The reasoning was that without the patch, one could still compile with ICX and
get silent errors or worst segfault later on. The patch idea was to prevent
those. That said, I agree that ICX looks buggy, so maybe we should just
error out if we detect it's being used?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-03-11 18:19:03 | Re: Make Intel's ICX compiler working |
| Previous Message | Andres Freund | 2026-03-11 18:10:54 | Re: Defend against -ffast-math in meson builds |