Closed MichaelLettrich closed 4 years ago
Experiencing the same issue: OS: Ubuntu 16.04 with kernel 4.15.0.38 CUDA 9.0 Origin Hipify-clang built from commit 2c99ef9 and one of the earlier commit used couple days ago also has this issue.
It looks like that if the file doesn't have any #include <cuda_runtime.h>
, then hipify-clang can successfully add #include <hip_runtime.h>
to it. However, while the file has that line of include, non-ascii issue will be up.
Nvm, PUBLIC doesn't solve anything, I mistaking the run files.
@kneternal I ran hipconvertinplace.sh (which uses hipify-clang) with removed includes for
#include <cuda_runtime.h>
and ran into the very same problems again. Only after removing #include <cuda.h>
as well, conversion went smoothly. As of now, this can be seen as a workaround.
Update:
change the target_link_libraries in CMakelist from private to public will solve the non-ascii issue and the conflict.
Cannot confirm this works on my system. Which CMakelist did you modify - the one of hipify-clang?
@kneternal I ran hipconvertinplace.sh (which uses hipify-clang) with removed includes for
#include <cuda_runtime.h>
and ran into the very same problems again. Only after removing#include <cuda.h>
as well, conversion went smoothly. As of now, this can be seen as a workaround.
Yeap, I am assuming that, all the cuda-related includes will affect hipify-clang.
Sorry for the spam that PUBLIC can be a workaround, I just messed up the run files.
Can confirm that the fix resolves the bug. Thank you for the quick intervention.
clang version 6.0.1-svn334776-1~exp1~20181018152737.116 (branches/release_60)
from official llvm reposreproduce by compiling square sample:
hipify-clang square.cu -- -x cuda --cuda-gpu-arch=sm_50 -L/usr/local/cuda/lib64 -lcudart_static -ldl -lrt -pthread -I/opt/rocm/include
will terminate without problems. Looking inside, I get#include <hip/hipn^D^@^@^P^@^@^@¸p¥
square.cu.hip.txtUsing
hipconvertinplace.sh
for a multifile project a couple of files were transformed OK while some resulted inreproduced on two different ubuntu 18.04 machines, one with ubuntu packaged clang, the other with official llvm packages. Building
hipify-clang
from release tag 1.9.1 resulted in the same issues.