Skip to content

Connect buffer wrapper no_init; Use hints only for for_each#2617

Open
danhoeflinger wants to merge 61 commits intomainfrom
dev/dhoeflin/connect_accessor_defer_foreach
Open

Connect buffer wrapper no_init; Use hints only for for_each#2617
danhoeflinger wants to merge 61 commits intomainfrom
dev/dhoeflin/connect_accessor_defer_foreach

Conversation

@danhoeflinger
Copy link
Copy Markdown
Contributor

@danhoeflinger danhoeflinger commented Mar 13, 2026

Connect no_init property to sycl buffer accessors for buffer wrappers.

Use hints from begin/end only for for_each APIs. Fully remove make_iter_mode resolution (ignore hints for all other APIs).

fix access modes for uninitialized apis
remove unnecessary pattern

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
fix access modes for uninitialized apis
remove unnecessary pattern

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com1>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
many access_modes with internal one which includes defer_to_hint

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger
Copy link
Copy Markdown
Contributor Author

/clang-format

@danhoeflinger danhoeflinger marked this pull request as ready for review March 18, 2026 13:04
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger
Copy link
Copy Markdown
Contributor Author

danhoeflinger commented Apr 7, 2026

#2550 Need to address (2) from this issue.

Update: done

@danhoeflinger danhoeflinger marked this pull request as draft April 7, 2026 14:45
…_range

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires a no_init flag through SYCL buffer range wrappers (so algorithms can request no_init when creating accessors) and narrows iterator “user hint” handling so that begin/end hint resolution is applied only for for_each/for_each_n (sync + async), while removing the prior make_iter_mode-based resolution elsewhere.

Changes:

  • Add _NoInit to __ranges::all_view and propagate it into accessor creation via sycl::property_list.
  • Introduce __pattern_for_each / __pattern_for_each_n (and async variants) that defer to sycl_iterator embedded access hints; update glue to call these new patterns.
  • Remove iter_mode_resolver / make_iter_mode infrastructure from the SYCL backend and stop using it in algorithms.

Reviewed changes

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

Show a summary per file
File Description
include/oneapi/dpl/pstl/hetero/dpcpp/utils_ranges_sycl.h Adds _NoInit to all_view, plumbs properties into accessor creation, and implements “defer to user hint” mode resolution for for_each.
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h Removes iter_mode_resolver / make_iter_mode implementation.
include/oneapi/dpl/pstl/hetero/algorithm_impl_hetero.h Adds hetero __pattern_for_each(_n) wrappers that enable hint resolution only for for_each APIs; removes make_iter_mode call sites.
include/oneapi/dpl/pstl/glue_algorithm_impl.h Routes for_each / for_each_n to the new __pattern_for_each(_n) entry points.
include/oneapi/dpl/pstl/algorithm_impl.h Adds generic (non-hetero) __pattern_for_each(_n) wrappers that forward to existing walk1 patterns.
include/oneapi/dpl/pstl/algorithm_fwd.h Adds forward declarations for __pattern_for_each and __pattern_for_each_n.
include/oneapi/dpl/internal/async_impl/glue_async_impl.h Updates for_each_async to call __pattern_for_each_async.
include/oneapi/dpl/internal/async_impl/async_impl_hetero.h Adds hetero __pattern_for_each_async wrapper enabling hint resolution; removes make_iter_mode usage in async fill.
include/oneapi/dpl/experimental/kt/internal/esimd_radix_sort_utils.h Updates helper overload to match the new all_view template parameter list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
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