From 4553e4e7f7130aee0e2aa43956b8ccb1bbbfbf07 Mon Sep 17 00:00:00 2001 From: pensun Date: Wed, 10 Aug 2016 11:31:13 -0500 Subject: [PATCH] add note in hip_faq regarding workaround that add keyword of static for all forceinline functions Change-Id: Ia13ba59b1e54df8ead5a96a952084144431ec72a --- docs/markdown/hip_faq.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/markdown/hip_faq.md b/docs/markdown/hip_faq.md index 0f2a43fe26..8b50a9a8c7 100644 --- a/docs/markdown/hip_faq.md +++ b/docs/markdown/hip_faq.md @@ -208,3 +208,9 @@ HIP_TRACE_API=1 HIP_DB=0x2 ./myHipApp ``` Note this trace mode uses colors. "less -r" can handle raw control characters and will display the debug output in proper colors. + +### What if HIP generates error of "symbol multiply defined!" only on AMD machine? +Unlike CUDA, in HCC, for functions defined in the header files, the keyword of "__forceinline__" does not imply "static". +Thus, if failed to define "static" keyword, you might see a lot of "symbol multiply defined!" errors at compilation. +The workaround is to explicitly add the keyword of "static" before any functions that were defined as "__forceinline__". +