Skip to content

Add dpctl dtype objects#2335

Draft
ndgrigorian wants to merge 2 commits into
masterfrom
add-dpctl-dtypes
Draft

Add dpctl dtype objects#2335
ndgrigorian wants to merge 2 commits into
masterfrom
add-dpctl-dtypes

Conversation

@ndgrigorian

Copy link
Copy Markdown
Collaborator

This PR proposes the addition of _dtypes.py, which implements dtype-related classes for dpctl, as well as a broadening of the permitted inputs as dpctl kernel arguments

Previously, complex scalars and float16 could not be passed to kernels, as ctypes lacks either of these constructs. Additionally, the kernel submission functions required ctypes arguments, rather than generic Python scalars or even NumPy scalars.

This PR proposes the addition of a DpctlScalar base class which defines scalars (using NumPy) and dpctl.dtype, which carries dtype metadata, as well as the expansion of permitted kernel arguments to include NumPy scalars and Python scalars

  • 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?

dpctl dtype objects and DpctlScalar allow support for new or exotic kernel arguments, including sycl::half and complex numbers

per SYCL, only permit native endianness
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

@coveralls

coveralls commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 75.013% (+0.4%) from 74.579% — add-dpctl-dtypes into master

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