Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Stuck on ATS-P GPUs

PcDack1
New Contributor I
1,579 Views

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

ats_machine.png

0 Kudos
4 Replies
HemanthCH_Intel
Moderator
1,546 Views

Hi,


We are working on your issue and will get back to you soon.


Thanks & Regards,

Hemanth


0 Kudos
Viet_H_Intel
Moderator
1,523 Views

I've reported this to our development team.

Thanks,


0 Kudos
Viet_H_Intel
Moderator
1,317 Views

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,


0 Kudos
thanhbinhqb
Beginner
940 Views
0 Kudos
Reply