You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to introduce yet another hipification approach: instead of a new hipified file or hipification in-place perform hipification in the source CUDA file by keeping both CUDA and HIP code in it.
[on deliberation]
For compiling such a single-source hipified code the following defines should be provided:
for AMD: -DNVIDIA=0 -DAMD=1 -DGPU_PLATFORM=AMD
for NVIDIA: -DNVIDIA=0 -DAMD=1 -DGPU_PLATFORM=NVIDIA
[IMP]
Both approaches should be available in hipify-clang first under corresponding options.
The text was updated successfully, but these errors were encountered:
Hi @emankov, any update on this feature?
I'm currently working on this exact approach (here an example)
... but I'm having difficulties with a slightly more complex library.
Nevertheless, any feedback would be appreciated ; )
Yes, I managed sort out most of my difficulties so far.
I think that, with the current state of HIP project and to do this cleanly with CMake, the philosophy seems to be: to encapsulate the CUDA/HIP functionalities and to be aware on the language property of each compilation unit.
(This is what I learned from writing the example share on the previous comment)
Attempting to use hip like I'm using cuda, has only got me into compilation puzzles and to develop several work-around.
(In the simplest cases, I have been stuck in linking problems because the compiler couldn't find the path to <hip/hip_runtime.h> and/or <hipblas/hipblas.h> where missing, or ---the really troublesome--- why sometimes I ended in hip headers complaining about missing links to cuda-headers.
Some disclosure: I'm working like if I were porting on a NVIDIA platform because I'm waiting to have access to a real AMD platform)
The idea is to introduce yet another hipification approach: instead of a new hipified file or hipification in-place perform hipification in the source CUDA file by keeping both CUDA and HIP code in it.
[Example]
[on deliberation]
For compiling such a single-source hipified code the following defines should be provided:
for AMD:
-DNVIDIA=0 -DAMD=1 -DGPU_PLATFORM=AMD
for NVIDIA:
-DNVIDIA=0 -DAMD=1 -DGPU_PLATFORM=NVIDIA
[IMP]
Both approaches should be available in hipify-clang first under corresponding options.
The text was updated successfully, but these errors were encountered: