Replies: 2 comments 1 reply
-
@kbobrovs, @DenisBakhvalov, could you please take a look? Should this be converted to an issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
There are lots of problems with this example. Some are caused by outdated spec - we have an internal tracker already to fix it. It also exposes a problem - global_ptr::get() produces This code below compiles fine: #include <CL/sycl.hpp>
#include <sycl/ext/intel/experimental/esimd.hpp>
using namespace sycl::ext::intel::experimental::esimd;
SYCL_EXTERNAL
void sycl_device_f(sycl::global_ptr<float> ptr, simd<float, 8> X) SYCL_ESIMD_FUNCTION {
block_store(reinterpret_cast<float*>(ptr.get()), X);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According the the ESIMD spec, the following should work:
SYCL_EXTERNAL
void sycl_device_f(sycl::global_ptr ptr, sycl::intel::gpu::simd<float, 8> X) [[intel::sycl_explicit_simd]] {
sycl::intel::gpu::flat_block_write(*ptr.get(), X);
}
Somehow the following failed compilation:
SYCL_EXTERNAL
simd<float,VL> doVadd(simd<float,VL> va, simd<float,VL> vb) [[intel::sycl_explicit_simd]] {
simd<float, VL> vc = va + vb;
return vc;
}
% clang++ -o launch -O2 -std=c++17 -fsycl -I ../../SYCL/ESIMD ../call_vadd_1d_esimd_extern.cpp
../call_vadd_1d_esimd_extern.cpp:27:63: error: 'sycl_explicit_simd' attribute cannot be applied to types
simd<float,VL> doVadd(simd<float,VL> va, simd<float,VL> vb) [[intel::sycl_explicit_simd]] {
Will appreciate any suggestions.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions