Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0O3Q-001rZI-2Z for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 18:13:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0O3P-00B789-10 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2026 18:13:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0O1M-00B3RJ-3D for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 18:11:01 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0O1L-00000001eGG-3B0P for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2026 18:11:00 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-485409ab264so1403225e9.1 for ; Wed, 11 Mar 2026 11:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773252657; x=1773857457; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PzSGZn5t/4w8XzIJ8/WfMNoJRUZngzgx+rvgTJG06gk=; b=nDliyrJ4eh8UaAMqGx1J9VTISNtblkyOnp0iu8Fc93muvbM4SlVoWGCvAB2TouCqPW LbAnjCkVCL5beRAcREl+giLOE01399XMUS1qp1BGx49kSM03wuXj91+iODj4UYJC7Ig5 bkN2nzADXg3A5zbcp34wSbujtBeRwhaDdBqlXcUPv2eVEgAlohwwbSNd9PNw68SVM6Bf KTVCu6k7q/lOZ+zZ158vWahY3LFgk+FpqedItYC4K5HdHWgxtxBRaoKiJ++476ADjKYQ 47xl/KhLyZBdPBhzvVkxAiXOjbANcKlzjvfxrgktTdT9G1+d4iRZUB2C0j4E6fXFdjqd 3lDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773252657; x=1773857457; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PzSGZn5t/4w8XzIJ8/WfMNoJRUZngzgx+rvgTJG06gk=; b=DjBSgzm1878VJqTYCSXpo7Anu+KI5BA3NCkN6fsvqN9j5ZO2avz17eu1ppemHXnZJb mN7ynnVxuGiEacJCLhjui0Mrc/Ty4Y2m1f/Yd1+TeVQNel9IpDm+CFGCLEptClQwrL2V LyAsXLV34eNGqYc3dt0arHEXf0EqztfZepTE8YCYDPsm/xHfLoLS9nd08HA0OztMLMy7 vyBlfKEICcpmZRXulpGXVkGqjk4oFUlR/PQtVFLW82RkY3CQLruI0LNxFEaxPZrwMT4c lNI5f7G6hPzJ9zOm2bnkF1B1MDRNiQDzPIc1ClE+5B85sqbkzjBRqTSjKE+m3R5Qv70U x3Zw== X-Gm-Message-State: AOJu0YyUj1QE7kmi+Bemn+Kx6QLHdKTPclfs4U2yFY3Wdv5b6PLQGVII /vemrTWNE3dTDZWHMHscn23QcxPMFtTK7d3jJ7hOfZjxIjJIiUiB+DFV X-Gm-Gg: ATEYQzxYtAcToNipgUEhQLU1zKaz5gKxj1lXzewxNVwvBUklVVkJCL3QOJ3AYf5aNh2 eWd7niPDs/de6au6Z9wmfFOi+B6OjcaBfX5z6PEUDFeXjC0+8vNF0m4CBHmiyh+IaD6XgvvUOny T740r0C28cHG96f9RunZWQ8Eoay8GThBA8G3O9jEQ2F7IJkFLW8B2aqTJIFUh28NuOfjge6lcvr salqidHOOhKwEWXEPJkILjew+ZIn8jfBna3Woe9zYGOTGNDLG0LWfoxcCSvYmvJziEz0kNaviqr 7vpy5hICkbpbOCTdLk/G8LdgClO4OuyJQdh9vEnfJz4+zMmIa7NrrTt5P/DlqkWhqiyHjpOWlpU 1bpbs0eT/9bAZpqEvHqxXlguIBU8BSrYyLwCosaHG7Lo+C5tcMrCYLoaOcWFPqVWWqGa6+zzDl2 U6yu/5k8CzmYR3fVaa4zhLx8l/cG9crymU0Zs3gvsog1nrhJfi4/yXLilTN139oK5rTH+0nT276 dOh7ty9fsZgK7gc7PkEwqconXdEWKJtkR4CHSa30BNuFfnInt5qTsqDow== X-Received: by 2002:a05:600c:4e8e:b0:485:3f58:da2 with SMTP id 5b1f17b1804b1-4854f59f546mr9536235e9.16.1773252656848; Wed, 11 Mar 2026 11:10:56 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541ab9f9esm174829725e9.4.2026.03.11.11.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 11:10:56 -0700 (PDT) Date: Wed, 11 Mar 2026 18:10:55 +0000 From: Bertrand Drouvot To: Andres Freund Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Make Intel's ICX compiler working Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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