Skip to content

[SYCL] Fix support for classes implicitly converted from items in parallel_for #5118

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

Merged
merged 2 commits into from
Dec 15, 2021

Conversation

aobolensk
Copy link
Contributor

@aobolensk aobolensk commented Dec 10, 2021

Section 4.9.4.2.2 of the SYCL 2020 specification says that the function object that represents the SYCL kernel function must take any type implicitly converted from SYCL item, representing the currently executing work-item within the range specified by the range parameter.

This PR adds that support.

E2E test: intel/llvm-test-suite#607

@aobolensk aobolensk requested a review from a team as a code owner December 10, 2021 07:54
@aobolensk aobolensk force-pushed the user_types_in_parallel_for branch from 97958a7 to 6f6569a Compare December 10, 2021 08:00
Copy link
Contributor

@vladimirlaz vladimirlaz left a comment

Choose a reason for hiding this comment

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

Please add E2E tests to intel/llvm-test-suite and reference them in the PR description.

Copy link
Contributor

@vladimirlaz vladimirlaz left a comment

Choose a reason for hiding this comment

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

The newly added E2E test fails on GPU: see intel/llvm-test-suite#607.
Please make sure that it passes locally.

@vladimirlaz
Copy link
Contributor

/summary:run

@vladimirlaz vladimirlaz merged commit 34b93bf into intel:sycl Dec 15, 2021
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Dec 15, 2021
* upstream/sycl: (5961 commits)
  [SYCL] Implement discard_events extension (intel#5026)
  [SYCL][NFC] Fix unused parameter warning in piQueueFlush (intel#5139)
  [SYCL][XPTI] Fix static analysis tool warnings (intel#5040)
  [CI] Switch post-commit jobs to self-hosted runners (intel#5147)
  [SYCL] Fix support for classes implicitly converted from items in parallel_for (intel#5118)
  [SYCL][HIP] Fix platform query in USM alloc info (intel#5140)
  [Docker] Add workarounds for two SYCL issues (intel#5143)
  [CI] Install cm-compiler in drivers image (intel#5128)
  [ESIMD] Add support for an arbitrary number of elements to simd::copy_from/to (intel#5135)
  [SYCL] Add number HW threads per EU query (intel#4901)
  [CI] Refactor workflow files (intel#5134)
  [CI] Enable HIP and CUDA plugins in GitHub Actions builds (intel#5087)
  [SYCL] Implement queue flushing (intel#5052)
  Disable issue labeler in LLVM forks
  Modify translation for disable_loop_pipelining metadata
  Add SPIR-V friendly translation for OpLoad and OpStore
  Fix return type postfix for SPIR-V Friendly IR
  Restrict special handling of sampler OpVariable only to UniformConstant
  Add lowering for llvm.bswap intrinsic
  Fix translation of OpVariable with OpSamplerType
  ...
bader pushed a commit that referenced this pull request Feb 8, 2022
…#5385)

In #5118 conversion for user defined types which are implicitly converted from sycl::items was added. It caused regression in case when sycl::id type is used, because with this change it converts to sycl::item but in fact it is not needed. That is why sycl::id class case should be checked explicitly.
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