[mlri][ExecutionEngine] Don't globaly set CMake prefixes to find HIP
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Mon, 23 Jan 2023 16:33:43 +0000 (16:33 +0000)
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Fri, 27 Jan 2023 21:06:07 +0000 (21:06 +0000)
commitd6fb08abf654b3ef9fdf990b3c11b7dde3fbbacd
tree4a4f1cac86c241b4e943d4b44b6574c3140bae79
parent9977b65ae240b2cc0dc512fe488b0063e51a517b
[mlri][ExecutionEngine] Don't globaly set CMake prefixes to find HIP

The HIP CMake files expect to find their own dependencies and don't
use or respect PATHS or HINTS, relying on CMAKE_PREFIX_PATH to contain
/opt/rocm and /opt/rocm/hip . This is not great for the rest of the
build. Therefore, copy the CMake prefix path, add the ROCm
directories, find HIP, and reset the path to its old value.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D142391
mlir/lib/ExecutionEngine/CMakeLists.txt