Skip to content

[SYCL-PTX] Add intermediate layer to libclc to ease type management #1712

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 6 commits into from
May 28, 2020

Conversation

Naghasan
Copy link
Contributor

This patch introduce a "core" layer, with function starting by __clc_, to implement builtin functions common to opencl and SPIR-V.

Some SPIR-V builtins are prefixed by a s or u to describe the type of the input. From the implementation point of view this serves no purpose (as it is carried by the type) and leads to a more complex usage of the builtins.
SPIR-V conversion function are expressed using various names, conversion implementation are now implemented as __clc_convert_<desc> and the opencl and SPIR-V convert function are implemented in terms of __clc_convert_* functions

Note: this patch introduce a generated header (spirv_builtins.h), the generator will be upstreamed separately.

@Naghasan Naghasan requested review from bader and a team as code owners May 19, 2020 15:48
@Naghasan Naghasan requested a review from alexbatashev May 19, 2020 15:48
Naghasan and others added 3 commits May 20, 2020 09:44
Start to drop the clc macro approach of builtin declaration in favor of a generated apprach.
The header is generated using the information present in clang/lib/Sema/SPIRVBuiltins.td

Co-Authored-By: David Wood <david.wood@codeplay.com>
Signed-off-by: Victor Lomuller <victor@codeplay.com>
…to handle signedness

Co-Authored-By: David Wood <david.wood@codeplay.com>
Signed-off-by: Victor Lomuller <victor@codeplay.com>
Co-Authored-By: David Wood <david.wood@codeplay.com>
Signed-off-by: Victor Lomuller <victor@codeplay.com>
@Naghasan Naghasan force-pushed the victor/spirv-conversion-2 branch from d9dbf0f to 366f973 Compare May 20, 2020 08:46
Naghasan and others added 2 commits May 20, 2020 10:11
Co-Authored-By: David Wood <david.wood@codeplay.com>
Signed-off-by: Victor Lomuller <victor@codeplay.com>
Signed-off-by: Victor Lomuller <victor@codeplay.com>
@Naghasan Naghasan force-pushed the victor/spirv-conversion-2 branch from 366f973 to f855285 Compare May 20, 2020 09:15
@bader bader added cuda CUDA back-end libclc libclc project related issues labels May 25, 2020
bader
bader previously approved these changes May 26, 2020
alexbatashev
alexbatashev previously approved these changes May 26, 2020
Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

LGTM

@Naghasan Naghasan dismissed stale reviews from alexbatashev and bader via 10cb903 May 27, 2020 13:18
bader
bader previously approved these changes May 27, 2020
@bader bader requested a review from alexbatashev May 27, 2020 13:20
Signed-off-by: Victor Lomuller <victor@codeplay.com>
@bader bader merged commit 72edbd9 into intel:sycl May 28, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Jun 2, 2020
* upstream/sycl:
  [SYCL] Handle KernelName templated using type with enum template argument (intel#1780)
  [SYCL] Fix KernelNameInfo generated for empty template parameter pack (intel#1775)
  [SYCL] Do not export utility methods from SYCLMemObjT (intel#1768)
  [Driver][SYCL] Fix processing when using -fsycl-link (intel#1765)
  [SYCL][NFC] Remove outdated confusing comment (intel#1779)
  [SYCL][NFC] Wrap classes in .cpp into a namespace to disable external linkage. (intel#1776)
  [SYCL][CUDA] Fixes CUDA unit tests that uses SYCL directly (intel#1763)
  [SYCL][Doc] Fix default device selection rules doc (intel#1769)
  [SYCL][CUDA] Remove pi Event Callback implementation (intel#1735)
  [SYCL] Throw exception if range/offset of kernel execution exceeds INT_MAX (intel#1713)
  [SYCL-PTX] Add intermediate layer to libclc to ease type management (intel#1712)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end libclc libclc project related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants