Closed wangzy0327 closed 2 years ago
Hi @wangzy0327,
So, you converted HIP to CUDA (not vice versa) and tried to compile the resulting CUDA source (by what?), got errors, and decided to file an issue to HIPIFY tools? What do you want from the HIPIFY team?
Sorry,I cannot describe it clearly. I compile the resulting CUDA source by regular expression reference hipify-perl. I want to know the limitations of conversion by regular expression. ep hipify-perl(what contents cannot convert?)
Well, you may provide both your source files. From the last screenshot, it looks like you are mixing CUDA and HIP APIs in your CUDA source.
Yes,I fix some bugs in my code. This is my test source files https://github.com/zjin-lcf/HeCBench/blob/master/atomicCAS-hip/main.cu https://github.com/zjin-lcf/HeCBench/blob/master/atomicCAS-cuda/main.cu
And convert file code and execute results
I've successfully hipified your atomicCAS-cuda to HIP both by hipify-perl
and hipify-clang
. The HIP source obtained by hipify-clang
is identical to your atomicCAS-hip.
Both atomicCAS-cuda and atomicCAS-hip was successfully compiled by hipcc
.
The segfault you got when running atomicCAS-hip
can happen for many reasons.
[Conclusions]
this is my github link about cudify: https://github.com/wangzy0327/Hip-conversion