- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found that when the compilation optimization level is O0 (using the compilation script below), the following code will stuck. I think it is related to sycl::stream (line 22-23).
Code
#include <CL/sycl.hpp>
using namespace sycl;
#define WRAP_SIZE 32
int main(){
sycl::gpu_selector selector;
queue exec_queue(selector);
int num_blocks=128;
int num_threads=256;
int size=num_blocks*num_threads;
int casBeg=0;
int casEnd=2;
double * _buff = (double*)sycl::malloc_device(sizeof(double)*size, exec_queue);
exec_queue.submit([&](sycl::handler& cgh)
{
sycl::stream out{ 4096, 128, cgh };
auto sharedmem = sycl::accessor<int, 1, sycl::access_mode::read_write, sycl::access::target::local>(11, cgh);
cgh.parallel_for(
sycl::nd_range<1>(num_blocks * num_threads, num_threads),
[=](sycl::nd_item<1> item_ct1) [[intel::reqd_sub_group_size(WRAP_SIZE)]] {
int blkId = item_ct1.get_group(0);
int tid = item_ct1.get_local_id(0);
if(blkId==0 && tid==0)
out<<"inter\n";
_buff[num_threads*blkId+tid]=tid;
item_ct1.barrier(sycl::access::fence_space::local_space);
});
}).wait();
std::cout<<"finish program!"<<std::endl;
return 0;
}
Compile and run scripts
# file run.sh
echo "compile program"
dpcpp -std=c++17 -o project_op1 main.cpp
dpcpp -std=c++17 -O0 -o project_op0 main.cpp
echo "run project op level-one"
./project_op1
echo "run project op level-zero"
./project_op0
Devcloud Machine
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on your issue and will get back to you soon.
Thanks & Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've reported this to our development team.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since this occurs only at -O0 and on ATS-P, developer is not planning to fix this issue. Hence, I will close this issue as "Wont Fix".
If it happens on other platforms, please create a new thread.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page