Skip to content

Update Intel compiler from icc to icx#152825

Open
hpkfft wants to merge 1 commit into
python:mainfrom
hpkfft:icx
Open

Update Intel compiler from icc to icx#152825
hpkfft wants to merge 1 commit into
python:mainfrom
hpkfft:icx

Conversation

@hpkfft

@hpkfft hpkfft commented Jul 1, 2026

Copy link
Copy Markdown

The Intel(R) oneAPI DPC++/C++ Compiler 2026.0.0 is not officially supported by CPython, and I am not suggesting to change that.
However, I see that there is code in configure.ac that applies to the Intel classic compiler (icc for C and icpc for C++). The last version of the classic compiler was 2021.10 and it stopped shipping in 2023.

I would like to suggest updating icc to icx in configure.ac.

Note that not all tests pass. In particular:

  File "/tmp/Lib/test/test_cmath.py", line 412, in test_phase
    self.assertAlmostEqual(phase(0), 0.)
                           ~~~~~^^^
ValueError: math domain error

and

  File "/tmp/Lib/test/test_math.py", line 304, in testAtan2
    self.ftest('atan2(0., -0.)', math.atan2(0., -0.), math.pi)
                                 ~~~~~~~~~~^^^^^^^^^
ValueError: math domain error

I do not think the Intel math library is wrong here; it's OK to set errno to EDOM for atan2(0.0, 0.0). GCC using glibc does not, and that's OK too. Both libraries return 0.0 for atan2(0.0, 0.0) and math.pi for atan2(0.0, -0.0).

If I comment out those tests, I can compile locally with PGO. Also, icx does support -Wno-unused-result, and -ffp-model=precise is needed or else other floating-point tests will fail. (As noted in the comment, clang uses precise by default. The Intel compiler is based on clang, but it has changed the default to fast.)

@bedevere-app

bedevere-app Bot commented Jul 1, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@StanFromIreland

Copy link
Copy Markdown
Member

Please open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants