This commit is contained in:
2026-06-08 15:34:44 +08:00
parent 607706b46e
commit adb0757caa
+3 -2
View File
@@ -179,10 +179,11 @@ RUN set -ex && \
for pkg in hipblaslt hiprtc; do \
cfg_dir="/opt/rocm/lib/cmake/${pkg}"; \
mkdir -p "${cfg_dir}" && \
printf 'set(%s_FOUND TRUE)\nset(%s_VERSION "7.2.1")\nif(NOT TARGET hip::%s)\n add_library(hip::%s INTERFACE IMPORTED)\n set_target_properties(hip::%s PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/opt/rocm/include")\nendif()\n' \
printf 'set(%s_FOUND TRUE)\nset(%s_VERSION "7.2.1")\nif(NOT TARGET hip::%s)\n add_library(hip::%s INTERFACE IMPORTED)\n set_target_properties(hip::%s PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/opt/rocm/include")\nendif()\nif(NOT TARGET %s::%s)\n add_library(%s::%s ALIAS hip::%s)\nendif()\n' \
"${pkg}" "${pkg}" "${pkg}" "${pkg}" "${pkg}" \
"${pkg}" "${pkg}" "${pkg}" "${pkg}" "${pkg}" \
> "${cfg_dir}/${pkg}-config.cmake" && \
echo "${pkg}-config.cmake created (minimal)."; \
echo "${pkg}-config.cmake created (minimal + namespace alias)."; \
done && \
# miopen minimal config(强制覆盖,miopen-hip 可能不带 cmake config)
mkdir -p /opt/rocm/lib/cmake/miopen && \