cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Ono-Sendai
Journeyman III

Severe memory leak bug with printf in OpenCL kernel on RX 480

Hi AMD developers,

We have run into a severe memory leak bug with the AMD OpenCL drivers on the RX 480.

The issue is, is that if there is a printf call anywhere in the kernel C source code, then about 500KB of system RAM (not GPU RAM) is leaked per kernel execution.

This only seems to happen on RX 480s. 

Maybe it happens on other GPUs as well, but we haven't had any users run into problems on other GPUs.

This results in memory exhaustion rapidly.

Commenting out any calls to printf causes the memory leak to not occur.

An example kernel that leaks:

int print_int_(int x) { printf("%i\n", x); return x; }   

__kernel void testKernel(__global int* result0)

{

  const int gid = get_global_id(0);

  result0[0] = gid;

}

0 Likes
4 Replies
dipak
Big Boss

Hi,

Thanks for reporting the memory leak issue. Could you please share the OS and driver details where you observed the issue?

Regards,

0 Likes

Windows 10, Radeon software version 16.8.3.

0 Likes

Thanks for the information. Actually, I was able to reproduce the memory leak issue using a Hawaii XT (R9 290X) card too with the latest Crimson 16.9.1. I've already filed a bug against it. As I get any update, I'll share with you.

Regards,

0 Likes

Just to inform you that the memory leak issue has been resolved in the latest internal build and the fix is expected to be released soon.

Regards,

0 Likes