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] Refactor and generate SYCL builtins #10198

Merged
merged 45 commits into from
Aug 10, 2023

Conversation

steffenlarsen
Copy link
Contributor

@steffenlarsen steffenlarsen commented Jul 4, 2023

This commit changes the builtin headers from defining all SYCL builtins to using a number of generated header files containing these builtin functions.

This commit refactors the current implementation of builtins, splitting
them into marray implementations and a new generator script generating
the scalar and vector variants. This also makes the scalar overloads
into overloads and makes the vector builtins templated on the size of
the vector.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 4, 2023 21:53 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 4, 2023 22:35 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 5, 2023 08:04 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 5, 2023 08:47 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 6, 2023 20:04 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 6, 2023 22:03 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 7, 2023 15:47 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 7, 2023 16:36 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 7, 2023 17:46 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 7, 2023 18:32 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 11, 2023 14:27 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 11, 2023 14:55 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 11, 2023 15:08 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen marked this pull request as ready for review July 25, 2023 18:02
@steffenlarsen steffenlarsen requested a review from a team as a code owner July 25, 2023 18:02
@steffenlarsen
Copy link
Contributor Author

This should be ready for review. Corresponding spec changes are in KhronosGroup/SYCL-Docs#440.

@steffenlarsen steffenlarsen temporarily deployed to aws July 25, 2023 18:19 — with GitHub Actions Inactive
@AlexeySachkov
Copy link
Contributor

@intel/sycl-language-enabling-triage: FYI

@steffenlarsen steffenlarsen temporarily deployed to aws July 25, 2023 19:05 — with GitHub Actions Inactive
sycl/include/sycl/builtins_utils.hpp Show resolved Hide resolved
sycl/include/sycl/marray.hpp Outdated Show resolved Hide resolved
sycl/source/builtins_generator.py Outdated Show resolved Hide resolved
sycl/source/builtins_generator.py Outdated Show resolved Hide resolved
sycl/source/builtins_generator.py Outdated Show resolved Hide resolved
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen temporarily deployed to aws July 27, 2023 09:06 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws July 27, 2023 09:51 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws August 1, 2023 13:19 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws August 1, 2023 14:03 — with GitHub Actions Inactive
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Copy link
Contributor

@dm-vodopyanov dm-vodopyanov left a comment

Choose a reason for hiding this comment

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

LGTM if all @AlexeySachkov's comment are resolved

@steffenlarsen
Copy link
Contributor Author

Discussed with @AlexeySachkov and we agreed that all his comments had been addressed. Merging.

@steffenlarsen steffenlarsen merged commit e4676b6 into intel:sycl Aug 10, 2023
11 checks passed
whitneywhtsang added a commit to sys-ce-bb/llvm that referenced this pull request Aug 14, 2023
whitneywhtsang added a commit to whitneywhtsang/llvm that referenced this pull request Aug 14, 2023
// RUN: %{run} %t.out

#ifdef _WIN32
#define _USE_MATH_DEFINES // To use vath constants
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo? "vath" -> "math"

mdtoguchi pushed a commit to mdtoguchi/llvm that referenced this pull request Oct 18, 2023
This commit changes the builtin headers from defining all SYCL builtins
to using a number of generated header files containing these builtin
functions.

---------

Signed-off-by: Larsen, Steffen <steffen.larsen@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.

6 participants