GPU Compute Software
Ask questions about Intel® Graphics Compute software technologies, such as OpenCL* GPU driver and oneAPI Level Zero
361 토론

Intel GPU: OpenMP Hangs on Target Directive

lamb
초급자
3,179 조회수

I'm having trouble running OpenMP on my Intel GPU. My OpenMP application seems to hang as soon as it encounters an OpenMP directive with the "target" clause. 

OS: x86_64 GNU/Linux
CPU: Intel(R) Xeon(R) CPU
Accelerator: Intel Iris Xe MAX
Toolkit: Intel(R) oneAPI DPC++ Compiler 2021.1 (2020.10.0.1113)

As an example, the following, sourced from Intel design examples:

Compilation Tested: icpx -fiopenmp -fopenmp-targets=spir64 -D__STRICT_ANSI__ -g matrix_mul_omp.cpp -o matrix_mul_omp

#pragma omp target teams distribute parallel for map(to : a, b) \
map(tofrom : c) thread_limit(128)
{
  for (i = 0; i < M; i++) {
    for (k = 0; k < N; k++) {
      // Each element of the product is just the sum 1+2+...+n
      for (j = 0; j < P; j++) {
        c[i][j] += a[i][k] * b[k][j];
      }
    }
  }
}

This example hangs, even with very small input sizes. I've tried other applications/examples and gotten the same results (hangs on first "target" directive). However, when testing using the default configuration on the Intel DevCloud, they execute successfully.

Any ideas? Let me know if I can add any more information.

Thanks

0 포인트
1 솔루션
PrasanthD_intel
중재자
3,135 조회수

Hi Jacob,


This was a known issue and has been included in the release notes (Intel® oneAPI Toolkits DPC++/C++ Compiler Release Notes).

The OpenMP offload hangs for Level0 backend.

Intel has released a patch for this as 2021.1.2 if you want to continue with Level0 please install the latest patch and follow the steps mentioned in the release notes.

Else if you can use the OpenCL backend and continue using your current version.

The default backend is Level0 and you can change using this environment variable export LIBOMPTARGET_PLUGIN=OPENCL.


Let us know if you face any issues.


Regards

Prasanth


원본 게시물의 솔루션 보기

2 응답
PrasanthD_intel
중재자
3,136 조회수

Hi Jacob,


This was a known issue and has been included in the release notes (Intel® oneAPI Toolkits DPC++/C++ Compiler Release Notes).

The OpenMP offload hangs for Level0 backend.

Intel has released a patch for this as 2021.1.2 if you want to continue with Level0 please install the latest patch and follow the steps mentioned in the release notes.

Else if you can use the OpenCL backend and continue using your current version.

The default backend is Level0 and you can change using this environment variable export LIBOMPTARGET_PLUGIN=OPENCL.


Let us know if you face any issues.


Regards

Prasanth


PrasanthD_intel
중재자
3,121 조회수

Hi Jacob,


Thanks for the confirmation.

As your issue has been resolved, we are closing this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


Regards

Prasanth


0 포인트
응답