From 8d306c0578e725949ea43dc3db70ab04b64f72ee Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Wed, 5 Apr 2017 21:59:11 -0500 Subject: [PATCH] Update bug workarounds to reflect tool improvements. [ROCm/hip commit: 00bf446d53b7def0433d52a99c0cef646655e3d9] --- projects/hip/docs/markdown/hip_bugs.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/projects/hip/docs/markdown/hip_bugs.md b/projects/hip/docs/markdown/hip_bugs.md index c53b68d796..14f2935f17 100644 --- a/projects/hip/docs/markdown/hip_bugs.md +++ b/projects/hip/docs/markdown/hip_bugs.md @@ -9,23 +9,23 @@ -### Errors related to undefined reference to `__hcLaunchKernel__***__grid_launch_parm** +### Errors related to undefined reference to `__hcLaunchKernel__***__grid_launch_parm**` Some common code practices may lead to hipcc generating a error with the form : undefined reference to `__hcLaunchKernel__ZN15vecAddNamespace6vecAddIidEEv16grid_launch_parmPT0_S3_S3_T_ -To workaround, try: -- Avoid calling hipLaunchKernel from a function with the __host__ attribute -``` -__host__ MyFunc(…) { -hipLaunchKernel(myKernel, …) -``` +Suggested workarounds: - Avoid use of static with kernel definition: +```c++ static __global__ MyKernel -- Avoid defining kernels in anonymous namespace +``` + +- Avoid defining kernels in anonymous namespace : +```c++ namespace { -__global__ MyKernel … -- Avoid calling member functions + __global__ MyKernel +} +``` ### What is the current limitation of HIP Generic Grid Launch method?