Skip to content

[SYCL]Support LLVM FP intrinsic in llvm-spirv and enable the corresponding … #2880

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
Dec 17, 2020

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Dec 9, 2020

…builtin in FE

Signed-off-by: gejin ge.jin@intel.com

…builtin in FE

Signed-off-by: gejin <ge.jin@intel.com>
@jinge90
Copy link
Contributor Author

jinge90 commented Dec 9, 2020

Hi, @andykaylor @bader @vzakhari
This PR includes:

  1. Add llvm float point intrinsic support in llvm-spirv
  2. Enable corresponding builtin in SemaSYCL
    This patch is ported from Andy's work and should fix std::complex issue on Windows platform.
    Thanks very much.

Signed-off-by: gejin <ge.jin@intel.com>
@jinge90
Copy link
Contributor Author

jinge90 commented Dec 9, 2020

/summary:run

@bader
Copy link
Contributor

bader commented Dec 9, 2020

@jinge90, please, commit llvm-spirv translator changes here: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/. They will be pulled to this repository.

Comment on lines 2 to 3
extern "C" float sinf(float);
extern "C" float cosf(float);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move "supported" function out of "unsupported-math.cpp" test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the "supported" math builtin/function into a new case "supported_math.cpp".

@jinge90
Copy link
Contributor Author

jinge90 commented Dec 10, 2020

@jinge90, please, commit llvm-spirv translator changes here: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/. They will be pulled to this repository.

Hi, @bader
Should I close this PR and commit the llvm-spirv translator change into https://github.com/KhronosGroup/SPIRV-LLVM-Translator/ firstly, then create a new PR in intel/llvm to enable the corresponding builtin when the llvm-spirv change is pulled into intel/llvm?
Thanks very much.

@bader
Copy link
Contributor

bader commented Dec 10, 2020

No. Clang and llvm-spriv parts are independent, so just move llvm-spirv patch from this PR to https://github.com/KhronosGroup/SPIRV-LLVM-Translator/.

@jinge90
Copy link
Contributor Author

jinge90 commented Dec 10, 2020

No. Clang and llvm-spriv parts are independent, so just move llvm-spirv patch from this PR to https://github.com/KhronosGroup/SPIRV-LLVM-Translator/.

OK,I will move the llvm-spirv part to another patch,commit to SPIRV-LLVM-Translator repo and only keep clang change in this PR.
Thanks very much!

andykaylor
andykaylor previously approved these changes Dec 11, 2020
Copy link
Contributor

@andykaylor andykaylor left a comment

Choose a reason for hiding this comment

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

This looks good to me. I think Alexey's suggestion to move the supported builtins to a separate test makes sense.

Signed-off-by: gejin <ge.jin@intel.com>
Signed-off-by: gejin <ge.jin@intel.com>
@jinge90
Copy link
Contributor Author

jinge90 commented Dec 16, 2020

Hi, @andykaylor
I updated the patch to move supported builtins to a separate test but missed your previous approval, could you help review again?
Thanks very much.

@vzakhari
Copy link
Contributor

This looks good to me, but, formally, clang code owners should review.

@jinge90
Copy link
Contributor Author

jinge90 commented Dec 16, 2020

/summary:run

Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

LGTM

@romanovvlad romanovvlad merged commit a5065ab into intel:sycl Dec 17, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Dec 21, 2020
* upstream/sycl: (616 commits)
  [SYCL][L0] Implement robust error handling in level_zero plugin (intel#2870)
  [SYCL][NFC] Code clean up (phase 5) revealed by self build. (intel#2907)
  [Driver][NFC] Remove unused variable (intel#2908)
  [Github Action] Enable automatic sync for main branch from llvm-project to llvm (intel#2904)
  [ESIMD][NFC] Remove unnecessary macro checks (intel#2900)
  [SYCL] Fix handling of multiple usages of composite spec constants (intel#2894)
  [SYCL] Adjust parallel-for range global size to improve group size selection (intel#2703)
  [SYCL] Add template parameter support for no_global_work_offset attribute (intel#2839)
  [SYCL] Support LLVM FP intrinsic in llvm-spirv and FE (intel#2880)
  [SYCL]Link Libm FP64 SYCL device library by default (intel#2892)
  [SYCL][NFC] Code clean up (phase 4) revealed by self build. (intel#2878)
  [SYCL][NFC] Code clean up (phase 3) revealed by self build. (intel#2865)
  [SYCL] Fix backend selection for SYCL_DEVICE_TYPE=* (intel#2890)
  [SYCL] Fix spec constants support in integration header (intel#2896)
  [Driver] Update unbundling of offload libraries to use archive type (intel#2883)
  [SYCL][NFC] Clang format SYCL.cpp (intel#2891)
  [CODEOWNERS] Add code owners for DPC++ tools (intel#2884)
  [XPTIFW] Enable in-tree builds (intel#2849)
  [SYCL] Don't dump IR and dot files by default in the LowerWGScope pass (intel#2887)
  [SYCL] Use llvm-link's only-needed option to link device libs (intel#2783)
  ...
@jinge90 jinge90 deleted the AddSupportForLLVMFPIntrinsic branch January 26, 2021 01:18
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