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

Option -fsycl-unnamed-lambda is no longer working #145

Open
keryell opened this issue Oct 22, 2021 · 3 comments · Fixed by #146
Open

Option -fsycl-unnamed-lambda is no longer working #145

keryell opened this issue Oct 22, 2021 · 3 comments · Fixed by #146
Assignees
Labels
bug Something isn't working

Comments

@keryell
Copy link
Member

keryell commented Oct 22, 2021

Describe the bug

Option -fsycl-unnamed-lambda is no longer working.
Perhaps a merge-from-upstream problem?

To Reproduce
In branch https://github.com/keryell/sycl/tree/linux-kernel-5.11

cd $SYCL_HOME/llvm/sycl/test/on-device/xocc/simple_tests
$SYCL_BIN_DIR/clang++ -std=c++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=fpga64_hls_hw_emu -o answer_42_unnamed answer_42_unnamed.cpp 
In file included from answer_42_unnamed.cpp:3:
In file included from /home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/sycl.hpp:11:
In file included from /home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/CL/sycl.hpp:15:
In file included from /home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/CL/sycl/backend.hpp:23:
In file included from /home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/CL/sycl/kernel_bundle.hpp:17:
/home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/CL/sycl/kernel.hpp:45:3: error: static_assert failed due to requirement '!std::is_same<sycl::detail::auto_name, sycl::detail::auto_name>::value' "No kernel name provided without -fsycl-unnamed-lambda enabled!"
  static_assert(
  ^
/home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/build/bin/../include/sycl/CL/sycl/handler.hpp:1213:26: note: in instantiation of template class 'sycl::detail::get_kernel_name_t<sycl::detail::auto_name, (lambda at answer_42_unnamed.cpp:25:23)>' requested here
        typename detail::get_kernel_name_t<KernelName, KernelType>::name;
                         ^
answer_42_unnamed.cpp:25:11: note: in instantiation of function template specialization 'sycl::handler::single_task<sycl::detail::auto_name, (lambda at answer_42_unnamed.cpp:25:23)>' requested here
      cgh.single_task([=] { a[0] = 42; });
          ^
1 error generated.

Environment (please complete the following information):

  • OS: Ububtu 21.04
  • DPC++ version: [e.g. commit hash or output of clang++ --version]
    $SYCL_BIN_DIR/clang++ --version
    clang version 14.0.0 (http://llvm.org/git/llvm.git d14853b2e6aadecfcc3afb0e71e5d5cf0d616384)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    
@keryell keryell added the bug Something isn't working label Oct 22, 2021
lforg37 pushed a commit to lforg37/sycl that referenced this issue Oct 22, 2021
@lforg37 lforg37 linked a pull request Oct 22, 2021 that will close this issue
lforg37 pushed a commit to lforg37/sycl that referenced this issue Oct 22, 2021
@keryell
Copy link
Member Author

keryell commented Oct 23, 2021

I have pushed another example for this #147

@keryell
Copy link
Member Author

keryell commented Oct 23, 2021

Making progress but XRT cannot find the kernel

-<%>- $SYCL_BIN_DIR/clang++ -std=c++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=fpga64_hls_hw_emu -o generic_executor_emu  generic_executor.cpp
-<%>- ./generic_executor_emu                                                                                                                      
INFO: [HW-EMU 01] Hardware emulation runs simulation underneath. Using a large data set will result in long simulation times. It is recommended that a small dataset is used for faster execution. The flow uses approximate models for Global memories and interconnect and hence the performance data generated is approximate.
configuring dataflow mode with ert polling
scheduler config ert(1), dataflow(1), slots(16), cudma(0), cuisr(0), cdma(1), cus(3)
XRT build version: 2.13.0
Build hash: 0ee051f3fa87ce0bda88a701870d7c41b4f4deb8
Build date: 2021-10-19 14:27:50
Git branch: master
PID: 284247
UID: 1000
[Sat Oct 23 01:52:15 2021 GMT]
HOST: rk-xsj
EXE: /home/rkeryell/Xilinx/Projects/LLVM/worktrees/xilinx/llvm/sycl/test/on-device/xocc/simple_tests/generic_executor_emu
[XRT] ERROR: kernel '' not found
terminate called after throwing an instance of 'cl::sycl::runtime_error'
  what():  Native API failed. Native API returns: -46 (CL_INVALID_KERNEL_NAME) -46 (CL_INVALID_KERNEL_NAME)
[1]    284247 segmentation fault (core dumped)  ./generic_executor_emu

lforg37 pushed a commit to lforg37/sycl that referenced this issue Oct 25, 2021
@lforg37
Copy link
Contributor

lforg37 commented Oct 25, 2021

Should be fixed by last update to #146

keryell added a commit that referenced this issue Oct 27, 2021
Fix ignored -fsycl-unnamed-lambda (#145)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants