Hi Cory, Cordell Bloor, on 2022-06-13: > I went back and reviewed some of my suggestions for HIP and rocRAND. > > On 2022-06-04 23:21, Cordell Bloor wrote: > > > > HIP Fix #2 > > > > The second problem with rocm-hipamd is that > > debian/patches/0007-isystem-removal.patch removes the wrong append to > > HIPCXXFLAGS. That's my fault. I listed the incorrect line numbers in my > > previous mail. It's |-isystem "$HIP_INCLUDE_PATH"| that causes problems, > > so that's lines 227-229 [1]. > > > I didn't notice at the time, but the hip tests failed to build after > deleting those lines. It seems that addition of the HIP include directory to > the compile flags may be needed when HIP is installed to a non-system > directory, but will cause problems when HIP is installed into /usr. > > Rather than outright removal, I found that I could guard the HIPCXXFLAGS > appends behind if($HIP_INCLUDE_PATH ne "/usr/include") for a successful > build. Another potential alternative to consider may be to use -idirafter > rather than -isystem. Thanks for the reread, I must admit I caught the build failure this weekend, but was still scratching my head about what I had broken. I did the necessary adjustments in rocm-hipamd to be able to move forwards on rocrand. > > rocRAND Fix #1 > > > > You'll need to delete the unnecessary HIP_COMPILER check at the end of > > VerifyCompiler.cmake [2]. It's checking that HIP_COMPILER STREQUAL > > "clang" and failing because HIP_COMPILER is "clang-14". It then emits a > > FATAL_ERROR to provide a 'friendly' error message. The entire section I > > linked in [2] can be deleted. All it does is suppress warnings. > > > The error that rocRAND emits is indeed unnecessary, but we will encounter > this sort of problem quite frequently if we set HIP_COMPILER as "clang-14". > The HIP_COMPILER should probably be changed in rocm-hipamd. As far as I can > tell, HIP_COMPILER is never used to compile anything. It can be left as > "clang" even if the compiler binary is "clang-14". The variable seems to > exist solely to distinguish nvcc, hcc and clang. I agree. I monkey patched something to cram the clang version everywhere in cmake files at first, but I do agree this is not solid on the long term. Will see to try your suggestion to unconditionally branch to the code path. I'm at a point where I manage to build rocrand packages, but I still struggle against googletest at the moment (main issue is to make the build procedure recognize the locally installed one in /usr/src/googletest, otherwise my build chokes on attempting Internet access). I thought I was missing GTEST_ROOT setting, but this is not sufficient; I will continue tomorrow. > > [1]: https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/upstream/5.0.0/hip/bin/hipcc#L227-229 > > [2]: https://github.com/ROCmSoftwarePlatform/rocRAND/blob/rocm-5.0.0/cmake/VerifyCompiler.cmake#L43-L51 > > > Sincerely, > Cory Bloor Have a nice day, :) -- Étienne Mollier <emollier@emlwks999.eu> Fingerprint: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da Sent from /dev/pts/1, please excuse my verbosity. On air: After Forever - Empty Memories
Attachment:
signature.asc
Description: PGP signature