Skip to content

Add sycl::platform pybind11 type caster - #2442

Draft
ndgrigorian wants to merge 1 commit into
feature/kernel-bundle-apifrom
feature/more-pybind11-casters
Draft

ndgrigorian wants to merge 1 commit into
feature/kernel-bundle-apifrom
feature/more-pybind11-casters

Conversation

@ndgrigorian

Copy link
Copy Markdown
Collaborator

This PR proposes the addition of a dpctl4pybind11.hpp type caster for sycl::platform, so that pybind11 extensions can take and return dpctl.SyclPlatform objects like they already can for devices, contexts, queues and kernel bundles

To support it, SyclPlatform is now exported through the Cython C-API with SyclPlatform_GetPlatformRef and SyclPlatform_Make, and import_dpctl() imports dpctl._sycl_platform

This PR is stacked on top of gh-2440

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?
  • If this PR is a work in progress, are you opening the PR as a draft?

Exports SyclPlatform through the Cython C-API with SyclPlatform_GetPlatformRef
and SyclPlatform_Make, and uses them in dpctl4pybind11.hpp.
@ndgrigorian
ndgrigorian force-pushed the feature/more-pybind11-casters branch from 0201095 to b93a6d1 Compare December 5, 2026 08:07
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

@coveralls

coveralls commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 76.45% — feature/more-pybind11-casters into feature/kernel-bundle-api. No base build found for feature/kernel-bundle-api.

This branch has not been deployed

No deployments
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.

2 participants