Skip to content

DOC: Clarify that GPU package is required for array API on CPU#3101

Open
david-cortes-intel wants to merge 1 commit intouxlfoundation:mainfrom
david-cortes-intel:array_api_gpu
Open

DOC: Clarify that GPU package is required for array API on CPU#3101
david-cortes-intel wants to merge 1 commit intouxlfoundation:mainfrom
david-cortes-intel:array_api_gpu

Conversation

@david-cortes-intel
Copy link
Copy Markdown
Contributor

Description

Turns out that using DPNP arrays on CPU with array API requires the DPC modules, as those objects contain sycl queues and the logic for handling them is in _onedal_py_dpc.

This PR updates the documentation to clarify that the GPU package is required for array API also on CPU.


Checklist:

Completeness and readability

  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
azure ?
github 81.95% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@icfaust
Copy link
Copy Markdown
Contributor

icfaust commented Apr 9, 2026

isnt pytorch cpu also array api? im worried you are conflating cpu sycl queues with array api by this PR.

@david-cortes-intel
Copy link
Copy Markdown
Contributor Author

isnt pytorch cpu also array api? im worried you are conflating cpu sycl queues with array api by this PR.

Yes, and PyTorch is probably going to work, but not dpnp.

@icfaust
Copy link
Copy Markdown
Contributor

icfaust commented Apr 10, 2026

@david-cortes-intel this note should explicitly mention dpnp cpu support because it is otherwise misleading, array api support does not require gpu support unless the data is on a oneapi device, which is the case for pytorch gpu, dpnp cpu and dpnp gpu, otherwise not. array api strict, pytorch cpu and many of the mentioned array api compat frameworks will work with a host only build

@david-cortes-intel
Copy link
Copy Markdown
Contributor Author

@david-cortes-intel this note should explicitly mention dpnp cpu support because it is otherwise misleading, array api support does not require gpu support unless the data is on a oneapi device, which is the case for pytorch gpu, dpnp cpu and dpnp gpu, otherwise not. array api strict, pytorch cpu and many of the mentioned array api compat frameworks will work with a host only build

@icfaust There's also more to it as the upcoming sklearn1.9 will have functions like move_estimator_to which, once we support, are likely to require the GPU package, due to working with string-valued device argument which on our side we handle by creating a queue out of it and moving data, which happens in the DPC module.

@icfaust
Copy link
Copy Markdown
Contributor

icfaust commented Apr 10, 2026

with that additional info that we should table or close this PR until more clarity can be added, and when sklearn 1.9 release occurs we can then update the docs here. if you want you can explicitly discuss oneapi device support, otherwise the info here is wrong

@david-cortes-intel
Copy link
Copy Markdown
Contributor Author

with that additional info that we should table or close this PR until more clarity can be added, and when sklearn 1.9 release occurs we can then update the docs here. if you want you can explicitly discuss oneapi device support, otherwise the info here is wrong

That scikit-learn1.9 release is scheduled for mid-year, and we're aiming to be compatible with it in our 2026.1 release ahead of their release, which is the branch where this PR will go. PRs for 'move_estimator_to' support should follow soon.

@icfaust
Copy link
Copy Markdown
Contributor

icfaust commented Apr 10, 2026

This PR can be tabled until those changes are made, while i wont put a changes requested on it, it does need to be changed from its current form. do realize what you are suggesting would amount to a feature loss as array api support occurs on host builds for all current sklearn array api releases (1.2-1.8). additionally this may require an internal discussion as this would be deleterious to arm and risc-v sklearnex support which require host builds (depending on its status) @syakov-intel

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