Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Add group algorithm constraints #2462

Merged
merged 12 commits into from
Sep 24, 2020

Conversation

Pennycook
Copy link
Contributor

@Pennycook Pennycook commented Sep 10, 2020

is_native_function_object proved too difficult to implement and use in a
practical way. Replacing it with constraints makes the behavior of group
algorithms more predictable and enables users to detect which type combinations
are supported at compile-time.

Replacing several usages of static_assert with constraints will also be useful in
ensuring that group algorithms are not considered during overload resolution
if the first argument is an execution policy rather than a group or sub_group.

While updating the traits to use is_pointer I realized that several functions
would only support multi_ptr because they used Ptr::element_type. This is now
fixed, by using remove_pointer instead.

Signed-off-by: John Pennycook john.pennycook@intel.com

is_native_function_object proved too difficult to implement and use in a
practical way.  Replacing it with constraints makes the behavior of group
algorithms more predictable and enables users to detect which type combinations
are supported at compile-time.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook added enhancement New feature or request spec extension All issues/PRs related to extensions specifications labels Sep 10, 2020
@Pennycook
Copy link
Contributor Author

Notes to reviewers:

  • This approach replaces the one discussed in [SYCL] Add is_native_function_object trait #2412.
  • The long form enable_if conditions are deliberate at this point; I'd appreciate your help in double-checking that the constraints for each algorithm are correct before we attempt to hoist common conditions into helper traits.

Conjunction of positive requirements && disjunction of negative requirements is
easier to read and understand.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
Signed-off-by: John Pennycook <john.pennycook@intel.com>
Should fix regression in fp16 reduction.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook marked this pull request as ready for review September 15, 2020 20:57
@Pennycook Pennycook requested review from a team as code owners September 15, 2020 20:57
@Pennycook Pennycook requested a review from rbegam September 15, 2020 20:57
pred(x) will transform any input type to Boolean.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
vladimirlaz
vladimirlaz previously approved these changes Sep 18, 2020
@vladimirlaz
Copy link
Contributor

/summary:run

@bader
Copy link
Contributor

bader commented Sep 22, 2020

@intel/dpcpp-specification-reviewers, please, take a look.

jbrodman
jbrodman previously approved these changes Sep 22, 2020
Signed-off-by: John Pennycook <john.pennycook@intel.com>
@jbrodman jbrodman self-requested a review September 23, 2020 20:38
@bader bader requested a review from vladimirlaz September 24, 2020 09:47
@bader bader merged commit 97bec24 into intel:sycl Sep 24, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Sep 29, 2020
…_wrapper

* upstream/sycl: (1533 commits)
  [SYCL] XFAIL sub_group shuffle tests on GPU
  [SYCL] Add support for L0 loader validation layer (intel#2520)
  [NFC][LIT] Temporary disable function pointers as they hang on L0 (intel#2544)
  [SYCL] use release version of OpenCL ICD loader
  [SYCL] Improve testing of host-task (intel#2540)
  Revert 1291215
  [SYCL] Fix warning caused by [[nodiscard]] attribute (intel#2545)
  [SYCL] Workaround windows build failure
  [SYCL] Remove kernel_signature_start from int header (intel#2537)
  [SYCL] Fix ABI tests in post-commit (intel#2539)
  [SYCL][DOC] Update C-CXX-StandardLibrary doc to align with latest status (intel#2529)
  [SYCL][NFC] Fix static code analysis concerns (intel#2531)
  [SYCL][NFC] Improve testing for accessor_property_list (intel#2532)
  [SYCL] Avoid overuse of CPU on wait read-write lock loop (intel#2525)
  [SYCL] Implement no-decomposition for kernel types that don't need it. (intel#2477)
  [SYCL] Add group algorithm constraints (intel#2462)
  [BuildBot] Uplift Windows GPU RT from 8673 to 8778 (intel#2533)
  [SYCL][LIT][NFC] Extend ABI test suite (intel#2522)
  [SYCL][DebugInfo] Reinstate source locations for some kernel instructions (intel#2527)
  [SYCL][NFC] Replace the deprecated VectorType::getNumElements() (intel#2524)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spec extension All issues/PRs related to extensions specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants