Skip to content

Work around missing OpenCL headers in Intel Windows conda package - #3010

Merged
antonwolfy merged 1 commit into
masterfrom
workaround-win-opencl-headers
Jul 30, 2026
Merged

Work around missing OpenCL headers in Intel Windows conda package#3010
antonwolfy merged 1 commit into
masterfrom
workaround-win-opencl-headers

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

The Windows conda build currently fails while compiling the C++/SYCL backend:

%PREFIX%\Library\include\sycl\detail\cl.h(22,10): fatal error: 'CL/cl.h' file not found
   22 | #include <CL/cl.h>

This is not a dpnp source issue — it is an Intel oneAPI packaging regression. This PR adds a workaround so the Windows build succeeds again.

Root cause

Starting with Intel oneAPI 2026.1.1, the intel-sycl-rt conda package no longer bundles the OpenCL headers (CL/cl.h and the rest of include/CL/*.h), even though the SYCL headers still #include <CL/cl.h>. This change was done by the packaging team to avoid conda ClobberWarnings against conda-forge's opencl-headers/ocl-icd.

The fix was applied asymmetrically across platforms:

intel-sycl-rt Ships CL/cl.h? opencl-headers dependency? dpnp build
Linux 2026.1.1-intel_325 ❌ removed depends: opencl-headers >=2025.06.13 ✅ passes
Windows 2026.1.1-intel_327 ❌ removed none ❌ fails

So on Linux the header is still pulled in transitively via the new opencl-headers dependency, while on Windows nothing provides CL/cl.h and the backend fails to compile.

Change

Add opencl-headers as a host dependency on Windows only:

- opencl-headers  # [win]

conda-forge's opencl-headers installs CL/cl.h to %PREFIX%\Library\include\CL\cl.h, which is already on the compiler include path (-external:I%PREFIX%\Library\include), so no build-script change is needed. Linux is left untouched since it already gets the header transitively.

Follow-up

This is a workaround. The proper fix is upstream: the Windows intel-sycl-rt package should gain the same opencl-headers run dependency that the Linux package received. Once that ships, this workaround can be removed.

@antonwolfy antonwolfy added this to the 0.21.0 release milestone Jul 30, 2026
@antonwolfy antonwolfy self-assigned this Jul 30, 2026
Starting with Intel oneAPI 2026.1.1, the `intel-sycl-rt` conda package no
longer bundles the OpenCL headers (`CL/cl.h`), which the SYCL headers still
`#include`. On Linux the package gained an explicit `opencl-headers` run
dependency (INST-26476), so the header is pulled in transitively and the
build keeps working. The Windows package dropped the headers without adding
that dependency, so the backend now fails to compile with:

    fatal error: 'CL/cl.h' file not found

Add `opencl-headers` as a host dependency on Windows to pull the header in
from conda-forge (it installs to `%PREFIX%\Library\include\CL\cl.h`, already
on the compiler include path). This is a workaround until the Intel Windows
`intel-sycl-rt` package is fixed to match the Linux dependency.
@antonwolfy
antonwolfy force-pushed the workaround-win-opencl-headers branch from 58af9fd to 71ef5e1 Compare July 30, 2026 10:48
Comment thread conda-recipe/meta.yaml
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@github-actions

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev3=py314h509198e_17 ran successfully.
Passed: 1374
Failed: 3
Skipped: 5

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.406%. remained the same — workaround-win-opencl-headers into master

@vlad-perevezentsev
vlad-perevezentsev self-requested a review July 30, 2026 12:35

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy
antonwolfy merged commit ffc6747 into master Jul 30, 2026
73 of 83 checks passed
@antonwolfy
antonwolfy deleted the workaround-win-opencl-headers branch July 30, 2026 12:39
github-actions Bot added a commit that referenced this pull request Jul 30, 2026
)

## Summary

The Windows conda build currently fails while compiling the C++/SYCL
backend:

```
%PREFIX%\Library\include\sycl\detail\cl.h(22,10): fatal error: 'CL/cl.h' file not found
   22 | #include <CL/cl.h>
```

This is **not** a dpnp source issue — it is an Intel oneAPI packaging
regression. This PR adds a workaround so the Windows build succeeds
again.

## Root cause

Starting with Intel oneAPI **2026.1.1**, the `intel-sycl-rt` conda
package no longer bundles the OpenCL headers (`CL/cl.h` and the rest of
`include/CL/*.h`), even though the SYCL headers still `#include
<CL/cl.h>`. This change was done by the packaging team to avoid conda
`ClobberWarnings` against conda-forge's `opencl-headers`/`ocl-icd`.

The fix was applied **asymmetrically** across platforms:

| `intel-sycl-rt` | Ships `CL/cl.h`? | `opencl-headers` dependency? |
dpnp build |
|---|---|---|---|
| Linux `2026.1.1-intel_325` | ❌ removed | ✅ `depends: opencl-headers
>=2025.06.13` | ✅ passes |
| Windows `2026.1.1-intel_327` | ❌ removed | ❌ **none** | ❌ fails |

So on Linux the header is still pulled in transitively via the new
`opencl-headers` dependency, while on Windows nothing provides `CL/cl.h`
and the backend fails to compile.

## Change

Add `opencl-headers` as a host dependency on Windows only:

```yaml
- opencl-headers  # [win]
```

conda-forge's `opencl-headers` installs `CL/cl.h` to
`%PREFIX%\Library\include\CL\cl.h`, which is already on the compiler
include path (`-external:I%PREFIX%\Library\include`), so no build-script
change is needed. Linux is left untouched since it already gets the
header transitively.

## Follow-up

This is a workaround. The proper fix is upstream: the Windows
`intel-sycl-rt` package should gain the same `opencl-headers` run
dependency that the Linux package received. Once that ships, this
workaround can be removed. ffc6747
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants