Skip to content

RFC Device Array experimental update - #2807

Open
danhoeflinger wants to merge 2 commits into
mainfrom
dev/dhoeflin/rfc_device_array_update
Open

danhoeflinger wants to merge 2 commits into
mainfrom
dev/dhoeflin/rfc_device_array_update

Conversation

@danhoeflinger

Copy link
Copy Markdown
Contributor

Update of the device_array / device_allocator / device_vector RFC after implementation of device_array.

Move device_array and device_allocator to experimental, add exit criteria.

Keep device_vector in proposed.

Adjusted RFC with things discovered during implementation.

  • Open question on handling exceptions from sycl::free during destruction / move operator
  • Open question on allocator API as a whole
  • Adjustments to API copy_from -> write_at for single elements
  • updates for noexcept handling
  • other minor items

Copilot AI 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.

Pull request overview

Updates the device-container RFCs to document the intended experimental/proposed split.

Changes:

  • Moves device_array and device_allocator documentation to experimental status.
  • Revises transfer and allocator APIs.
  • Adds open questions and experimental exit criteria.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
rfcs/proposed/device_vector/README.md Documents the RFC status split.
rfcs/proposed/device_vector/device_vector_compat.md Updates allocator requirements and open questions.
rfcs/experimental/device_array/README.md Documents the experimental APIs, behavior, and exit criteria.
Suppressed comments (6)

rfcs/experimental/device_array/README.md:14

  • This status is premature in this branch: there is no include/oneapi/dpl/experimental/device_array header, and searches under include/ and test/ find no device_array or device_allocator implementation or tests. That also makes the documented include/example unusable and conflicts with the experimental-state requirement in rfcs/experimental/README.md:3-6. Merge the implementation/release first, or keep this RFC proposed.
    rfcs/experimental/device_array/README.md:113
  • This claims a uniform data-first order and three forms for each operation, but read_at/to_vector have only two forms and the new write_at deliberately takes the position before the value. Describe bulk and single-element overloads separately so the API summary matches the declarations.
    rfcs/experimental/device_array/README.md:101
  • The stated noexcept condition omits allocator state. The same RFC says device_allocator stores a sycl::property_list (lines 264-266), so moving/assigning the base can also depend on that member; move assignment additionally has a distinct condition from move construction. Document each operation in terms of all stored state rather than only context/device.
    rfcs/experimental/device_array/README.md:328
  • Remove the duplicated space.

This issue also appears on line 484 of the same file.
rfcs/experimental/device_array/README.md:484

  • Correct the spelling of “occurrence.”
    rfcs/experimental/device_array/README.md:501
  • This exit criterion is an incomplete sentence: “whether the shared base and the DeviceAllocator contract” has no predicate, so it does not state what the implementation is meant to validate.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


| Part | State | Document |
|---|---|---|
| `device_array<T>`, `device_allocator<T, Alignment>` | **Experimental** — implemented and released in `oneapi::dpl::experimental` | [rfcs/experimental/device_array](../../experimental/device_array/README.md) |
Comment on lines +286 to +289
The default allocator, `oneapi::dpl::experimental::device_allocator`, is already
implemented and released as an experimental feature alongside `device_array`; it is
specified in the
[device_array RFC](../../experimental/device_array/README.md#device_allocator). It is
```

Allocation failure surfaces as the `sycl::exception` thrown by the underlying USM `sycl::malloc_device` or `sycl::aligned_alloc_device`.
The allocator must be copy-constructible and copy-assignable. It should signal allocation
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger
danhoeflinger force-pushed the dev/dhoeflin/rfc_device_array_update branch from 2afb56f to fd6ec8a Compare August 21, 2026 20:14
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