Skip to content

[SYCL] Remove unexpected double in complex SPIRV for float support #1381

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 1 commit into from
Mar 25, 2020

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Mar 24, 2020

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

@jinge90 jinge90 requested review from vzakhari and bader and removed request for bader March 24, 2020 06:18
@jinge90 jinge90 requested a review from bader March 24, 2020 07:43
@bader
Copy link
Contributor

bader commented Mar 24, 2020

I think there is a better way to solve this problem.
We should make use of -cl-single-precision-constant option that emits f32 values to LLVM for OpenCL C doubles.

@bader bader changed the title [SYCL] remove unexpected double in complex SPIRV for float support [SYCL] Remove unexpected double in complex SPIRV for float support Mar 24, 2020
@vzakhari
Copy link
Contributor

I think there is a better way to solve this problem.
We should make use of -cl-single-precision-constant option that emits f32 values to LLVM for OpenCL C doubles.

Alexey, is there such an option for C++ compiler?

@bader
Copy link
Contributor

bader commented Mar 25, 2020

I think there is a better way to solve this problem.
We should make use of -cl-single-precision-constant option that emits f32 values to LLVM for OpenCL C doubles.

Alexey, is there such an option for C++ compiler?

I don't know, but my point is that the same problem might appear in the user's code and compiler is able to help the user to identify unsupported type uses or even fix them. The necessary logic is implemented in the compiler, we just need to expose it to the user.
If C++ doesn't have this option we can add SYCL mode alias for -cl-single-precision-constant.
Does it make sense?

@vzakhari
Copy link
Contributor

I think there is a better way to solve this problem.
We should make use of -cl-single-precision-constant option that emits f32 values to LLVM for OpenCL C doubles.

Alexey, is there such an option for C++ compiler?

I don't know, but my point is that the same problem might appear in the user's code and compiler is able to help the user to identify unsupported type uses or even fix them. The necessary logic is implemented in the compiler, we just need to expose it to the user.
If C++ doesn't have this option we can add SYCL mode alias for -cl-single-precision-constant.
Does it make sense?

Sure, it makes sense. I was just hoping to use that option right now.

@bader
Copy link
Contributor

bader commented Mar 25, 2020

I think there is a better way to solve this problem.
We should make use of -cl-single-precision-constant option that emits f32 values to LLVM for OpenCL C doubles.

Alexey, is there such an option for C++ compiler?

I don't know, but my point is that the same problem might appear in the user's code and compiler is able to help the user to identify unsupported type uses or even fix them. The necessary logic is implemented in the compiler, we just need to expose it to the user.
If C++ doesn't have this option we can add SYCL mode alias for -cl-single-precision-constant.
Does it make sense?

Sure, it makes sense. I was just hoping to use that option right now.

It's possible for the libraries written in OpenCL C/C++ kernel language, which seems to be a good option for SPIR target libraries.

@bader bader merged commit b51bb87 into intel:sycl Mar 25, 2020
alexbatashev added a commit to alexbatashev/llvm that referenced this pull request Mar 27, 2020
…hinx

* upstream/sycl: (357 commits)
  [Support] Implement a simple tabular data management library (intel#1358)
  [Support] Implement a property set I/O library (intel#1357)
  [SYCL] Fix buffer constructor using iterators (intel#1386)
  [SYCL][FPGA] Enable a set of loop attributes (intel#1312)
  [Driver][SYCL][FPGA] Proper dependency output location when given /Fo<dir> (intel#1346)
  [SPIR-V] Enabling SPIR-V builtin lookup in device SYCL mode (intel#1384)
  [SYCL][NFC] Unify setting kernel arguments (intel#1379)
  [SYCL][Doc] First revision of standard layout relaxation extension (intel#1344)
  [SYCL] Fixed sub-buffer alloca search (intel#1385)
  [SYCL][FPGA] Emit multiple IR variants for the IVDep attribute (intel#1383)
  [SYCL] Add experimental flag to enable front-end optimizations (intel#1376)
  [SYCL] Remove unexpected double in complex SPIR-V for float support (intel#1381)
  [SYCL] Default work-group sizes based on max (intel#952)
  [SYCL][CUDA] Fix usage of multiple backends in the same program (intel#1252)
  [SPIR-V] Add SPIR-V builtin definitions to the builtin lookup.
  [SPIR-V] Add macro definition when -fdeclare-spirv-builtins is activated
  [SYCL] Fix sycl_generic printing
  [SYCL] Support intel::reqd_work_group_size (intel#1328)
  [SYCL][NFC] Make the RT::PiPlugin object private (intel#1375)
  [SPIRV] Add convergent attribute to SPIR-V built-ins (intel#1373)
  ...
@jinge90 jinge90 deleted the remove_unexpected_double branch April 2, 2020 01:14
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.

3 participants