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

hipSYCL support #20

Open
bd4 opened this issue Nov 22, 2022 · 3 comments
Open

hipSYCL support #20

bd4 opened this issue Nov 22, 2022 · 3 comments

Comments

@bd4
Copy link
Contributor

bd4 commented Nov 22, 2022

This likely requires some changes to hipSYCL and some changes to the sycl_ext_complex header:

  • hipSYCL does not yet have isinf
  • the sycl::half define in hipSYCL does not support float operations

I suggest we have a define for disabling/enabling sycl::half. We could do this by having the user define e.g. 'SYCL_EXT_COMPLEX_DISABLE_HALFbefore the header, or do compiler detection and hard code, .e.g enable if__INTEL_CLANG_COMPILER` is set and disable otherwise, or disable just if a hipsycl define is present. I am more inclined towards the user define to disable it, more flexible and then we are not hardcoding version checks that may need to change.

@bd4
Copy link
Contributor Author

bd4 commented Nov 22, 2022

See also AdaptiveCpp/AdaptiveCpp#341

@TApplencourt
Copy link
Collaborator

I think for sycl::half it's user's responsibility to check for aspect::fp16 before calling any API with half.

As Illuhad said, the type should be defined, so the code including our sycl::ext::complex should compile. Using it is a different story :). Or maybe I'm missing something!

@illuhad
Copy link
Contributor

illuhad commented Jun 22, 2023

the sycl::half define in hipSYCL does not support float operations

We have universal support for half and half arithmetic now across all backends and devices (even though it might be emulated if there's no native support), but we don't have half overloads for the sycl:: math functions yet. I'm not sure if that's a problem though as it might just implicitly convert to float and then invoke the float overload.

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

No branches or pull requests

3 participants