Add dpctl.SyclQueue.fill() method - #2365
Open
vlad-perevezentsev wants to merge 17 commits into
Open
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2365/index.html |
Collaborator
vlad-perevezentsev
marked this pull request as ready for review
August 18, 2026 15:20
vlad-perevezentsev
requested review from
antonwolfy and
ndgrigorian
as code owners
August 18, 2026 15:20
ndgrigorian
reviewed
Aug 28, 2026
| SyclQueue q, | ||
| object dst, | ||
| object value, | ||
| size_t count, |
Collaborator
There was a problem hiding this comment.
We need a check for OOB count, I think simply raising would be fine
ndgrigorian
reviewed
Aug 28, 2026
| cval = complex(value) | ||
| return struct.pack("=" + fmt, cval.real, cval.imag) | ||
| return struct.pack("=" + fmt, value) | ||
| except (struct.error, TypeError, ValueError) as e: |
Collaborator
There was a problem hiding this comment.
struct.pack("=f", 1e40) raises an OverflowError, not covered here
ndgrigorian
reviewed
Aug 28, 2026
Comment on lines
+1229
to
+1230
| Val.real = Value[0]; | ||
| Val.imag = Value[1]; |
Collaborator
There was a problem hiding this comment.
we need a check here and in the original DPCTLQueue_Fill128 for nullptr Value here, as the try block won't prevent the segfault from a nullptr deref
ndgrigorian
reviewed
Aug 28, 2026
| delete[] host_arr; | ||
| } | ||
|
|
||
| TEST_P(TestDPCTLQueueMemberFunctions, CheckFill8WithEvents) |
Collaborator
There was a problem hiding this comment.
need test where Value is nullptr for Fill128 variants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes adding
dpctl.SyclQueue.fillanddpctl.SyclQueue.fill_asyncmethods as a Python wrapper oversycl::queue::fillbacked by the existingDPCTLQueue_Fill8/16/32/64/128and newDPCTLQueue_Fill8/16/32/64/128WithEventsC-API functions and adding a newtest_sycl_queue_fill.py