cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

mchan1
Journeyman III

The program hangs after calling "printf" side a GPU kernel

  • GPU hardware: MI50
  • ROCm version: 4.1
  • OS: Ubuntu 18.04

 

Reproduce:

#include <hip/hip_runtime.h>
#include <stdio.h> #define CHECK(cmd) \ {\ hipError_t error = cmd;\ if (error != hipSuccess) { \ fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error,__FILE__, __LINE__); \ exit(EXIT_FAILURE);\ }\ } __global__ void foo() { printf("hello world\n"); return; } int main() { hipLaunchKernelGGL(foo, dim3(1), dim3(1), 0, 0); CHECK(hipDeviceSynchronize()); return 0; }

After launching the kernel, the program hangs. And the GPU is not available (no response on rocm-smi) until I reboot the whole system. 

 

0 Likes
0 Replies