SYCLomatic icon indicating copy to clipboard operation
SYCLomatic copied to clipboard

DPCT header issue when built with GCC 13.3.0

Open abagusetty opened this issue 11 months ago • 1 comments

Describe the bug

I was trying to use the DPCT headers in a project and got into this following issue. SYCLomatic built with GCC 13.3.0

/vast/users/abagusetty/compilers/today/llvm/build_hip6.3.0_01-28-2025/install/bin/../include/CL/sycl.hpp:14:2: warning: "CL/sycl.hpp is deprecated, use sycl/sycl.hpp" [-W#warnings]
   14 | #warning "CL/sycl.hpp is deprecated, use sycl/sycl.hpp"
      |  ^
In file included from ./dpcpp/kernels.dp.cpp:27:
In file included from /vast/users/abagusetty/compilers/today/SYCLomatic/install-hip6.3.0_01-28-2025/include/dpct/dpct.hpp:52:
/vast/users/abagusetty/compilers/today/SYCLomatic/install-hip6.3.0_01-28-2025/include/dpct/device.hpp:595:21: error: no matching member function for call to 'push_back'
  595 |         last_events.push_back(q->ext_oneapi_get_last_event());
      |         ~~~~~~~~~~~~^~~~~~~~~
/soft/compilers/gcc/13.3.0/x86_64-suse-linux/lib/gcc/x86_64-pc-linux-gnu/13.3.0/../../../../include/c++/13.3.0/bits/stl_vector.h:1281:7: note: candidate function not viable: no known conversion from 'std::optional<event>' to 'const value_type' (aka 'const sycl::event') for 1st argument
 1281 |       push_back(const value_type& __x)
      |       ^         ~~~~~~~~~~~~~~~~~~~~~
/soft/compilers/gcc/13.3.0/x86_64-suse-linux/lib/gcc/x86_64-pc-linux-gnu/13.3.0/../../../../include/c++/13.3.0/bits/stl_vector.h:1298:7: note: candidate function not viable: no known conversion from 'std::optional<event>' to 'value_type' (aka 'sycl::event') for 1st argument
 1298 |       push_back(value_type&& __x)
      |       ^         ~~~~~~~~~~~~~~~~

To reproduce

No response

Environment

No response

Additional context

No response

abagusetty avatar Jan 28 '25 17:01 abagusetty

Looks like a PR is in place: https://github.com/oneapi-src/SYCLomatic/pull/2646

abagusetty avatar Feb 03 '25 15:02 abagusetty

Completed in the above PR

abagusetty avatar Jun 05 '25 14:06 abagusetty