Skip to content

Use of sycl::half, with CL/sycl.hpp SYCL header included #149

Closed
@sbalint98

Description

@sbalint98

In #143, the half data types were replaced with sycl::half, while including the CL/sycl.hpp SYCL header. According to the SYCL specification section 4.3, when that header is included all SYCL types should exist inside the ::cl::sycl namespace.

Unfortunately, this change also breaks compilation with hipSYCL, since sycl::half is not defined. In order to solve this problem I see three possible solutions:

  1. Use, like for all other SYCL types, the ::cl::sycl namespace for half as well
  2. Move to the ::sycl namespace in case of all SYCL types, and include the sycl/sycl.hpp header instead of CL/sycl.hpp
  3. Add a hipSYCL specific workaround similar to Add hipSYCL scope_handle and host_task #122 (comment)

I think the most consistent and least error-prone solution would be the first one. Can you give some feedback on what would be the preferred solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionA request for more information or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions