Closed franz closed 9 months ago
I think we should check where the .so is located all call the hipcc based on that dir
I think we should check where the .so is located all call the hipcc based on that dir
+1.
In PoCL we use an environment variable POCL_BUILDING to direct to use build dir data (bitcode lib etc.), but the .so path still needs to be set in LD_LIBRARY_PATH (in this case in check.py perhaps?). Perhaps we can use the same idea here?
Some hiprtc tests can fail because of how
hiprtcCompileProgram
works:hiprtcCompileProgram
callsgetHIPCCPath
which prefers the installedhipcc
(for release builds, see code snippet below). So if e.g. the user runs cmake withCMAKE_BUILD_TYPE=Release
and identicalCMAKE_INSTALL_PREFIX
for multiple different chipStar builds, and forgets to callmake install
, the hiprtc tests will call hipcc from whatever build is currently installed in the prefix.There should be a way to force the tests only use hipcc from build directory, and use it with ctest / check.py. One solution is to switch above code to always use CHIP_BUILD_DIR first, another way is an extra environment variable, another a cmake option. @pvelesko @pjaaskel @linehill preferred solution ?