Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

how to migrate to the SYCL2020 USM model?#1683

Unanswered
Minyuluck asked this question inQ&A
Discussion options

Hello there
My question is how to use SYCL2020 USM model in AdaptiveCpp?
I recently build AdaptiveCpp from branch "sycl/2020" inhttps://github.com/AdaptiveCpp/AdaptiveCpp.git and used LLVM v17.0.0. Then I build two benchmarks and met some errors:

  1. BabelStream
    I couldn't select programming model as "sycl2020". The errors are like:
    BabelStream/src/sycl2020/SYCLStream2020.cpp:171:13: error: no viable overloaded '+='
    171 | sum += ka[idx] * kb[idx];>
    or
    /../hipSYCL/sycl/handler.hpp:962:11: error: no matching function for call to object of type 'const (lambda at ../BabelStream/src/sycl2020/SYCLStream2020.cpp:169:7)'
    962 | f(this_item, reducers...);>

I could only set "sycl" available. Then I run the executable, and got this info:

sycl1
2) sycl-bench.
Same as above, when i run the executable, i met:
[AdaptiveCpp Warning] This application uses SYCL buffers; the SYCL buffer-accessor model is well-known to introduce unnecessary overheads. Please consider migrating to the SYCL2020 USM model, in particular device USM (sycl::malloc_device) combined with in-order queues for more performance.

You must be logged in to vote

Replies: 1 comment

Comment options

Hi,

  1. BabelStream

BabelStream uses a workaround for earlier versions of AdaptiveCpp for reductions. This workaround is no longer needed, and is incorrect with recent AdaptiveCpp. It is likely responsible for the issue. There is an#if defined(__HIPSYCL__) || defined(__OPENSYCL__) inSYCLStream2020.cpp. Remove that ifdef, so that only the code from the#else branch remains.

  1. sycl-bench

This warning is triggered when an application uses the buffer-accessor model, which is known to cause performance issues in some cases (not only for AdaptiveCpp, but for other SYCL implementations like oneAPI as well).
There is still a lot of older SYCL code around that uses this model. SYCL-Bench is one of these cases, and should migrate its benchmarks to the USM model as instructed by the warning.

This warning does not hint at a functionality issue, so everything should still work.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@Minyuluck@illuhad

[8]ページ先頭

©2009-2025 Movatter.jp