This is an archive of the discontinued LLVM Phabricator instance.

[mlri][ExecutionEngine] Don't globaly set CMake prefixes to find HIP
ClosedPublic

Authored by krzysz00 on Jan 23 2023, 11:13 AM.

Details

Summary

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.

Diff Detail

Event Timeline

krzysz00 created this revision.Jan 23 2023, 11:13 AM
krzysz00 requested review of this revision.Jan 23 2023, 11:13 AM

It would be more productive to fix the rocm cmake huild if you’re going to touch this. Not respecting paths or hints is very broken

@arsenm That being said, would this make the hack more acceptable since now loading in hip doesn't pollute the global CMake context?

(I don't even know how to start trying to change ROCm's cmake files)

arsenm accepted this revision.Jan 27 2023, 10:19 AM

I guess this is improving things technically

This revision is now accepted and ready to land.Jan 27 2023, 10:19 AM