diff --git a/docs/markdown/hip_bugs.md b/docs/markdown/hip_bugs.md new file mode 100644 index 0000000000..0bece74974 --- /dev/null +++ b/docs/markdown/hip_bugs.md @@ -0,0 +1,24 @@ +# HIP Bugs + + + +- [Errors related to undefined reference to `__hcLaunchKernel__***__grid_launch_parm**](#error-undefined-reference) + + + +### 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 hcLaunchKernel from a function with the __host__ attribute +__host__ MyFunc(…) { +hipLaunchKernel(myKernel, …) +- Avoid use of static with kernel definition: +static __global__ MyKernel +- Avoid defining kernels in anonymous namespace +namespace { +__global__ MyKernel … +- Avoid calling member functions +