[llvm-dev] instrumenting device code with gpucc
Yuanfeng Peng via llvm-dev
llvm-dev at lists.llvm.org
Thu Mar 10 17:21:05 PST 2016
Hi Jingyue,
Thank you so much for the helpful response! I didn't know that PTX
assembly cannot be linked; that's likely the reason for my issue.
So I did the following as you suggested(axpy-sm_30.bc is the instrumented
bitcode, and cuda_hooks-sm_30.bc contains the hook functions):
*llvm-link axpy-sm_30.bc cuda_hooks-sm_30.bc -o inst_axpy-sm_30.bc*
*llc inst_axpy-sm_30.bc -o axpy-sm_30.s*
*"/usr/local/cuda/bin/ptxas" "-m64" "-O3" -c "--gpu-name" "sm_30"
"--output-file" axpy-sm_30.o axpy-sm_30.s*
However, I got the following error from ptxas:
*ptxas axpy-sm_30.s, line 106; error : Duplicate definition of function
'_ZL21__nvvm_reflect_anchorv'*
*ptxas axpy-sm_30.s, line 106; fatal : Parsing error near '.2': syntax
error*
*ptxas fatal : Ptx assembly aborted due to errors*
Looks like some cuda function definitions are in both bitcode files which
caused duplicate definition... what am I supposed to do to resolve this
issue?
Thanks!
yuanfeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160310/bd9f20a5/attachment.html>
More information about the llvm-dev
mailing list