Archived
tests: the oot test builds libr4d at the tree's RAD_HIP_VOPD_REPEATABLE
oot_plugins.sh gave libr4d's out-of-tree configure the tree's HIP compiler and targets but not RAD_HIP_VOPD_REPEATABLE. In a tree configured as the build image configures it (ON, for the patched LLVM 24), the out-of-tree libr4d was compiled with VOPD pairing off and step 5 found different device code. The option is now the script's sixth argument (default OFF), forwarded to the device libraries' configure. In radiance-build, ctest -L oot failed at step 5 and now passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
df030c7483
commit
35b357825e
2 files changed
+12
-10
No files matched your search
@@ -506,13 +506,13 @@ endif()
|
|||||||
# Installs the build into a prefix, then configures, builds and installs every plugin directory
|
# Installs the build into a prefix, then configures, builds and installs every plugin directory
|
||||||
# standalone against it with find_package(radiance). The result must match the tree's plugins,
|
# standalone against it with find_package(radiance). The result must match the tree's plugins,
|
||||||
# vocabulary and registration, and serve rad-kbench's fixture through the installed tools
|
# vocabulary and registration, and serve rad-kbench's fixture through the installed tools
|
||||||
# (tests/oot_plugins.sh). libr4d is included when the tree built it, with the same HIP compiler and
|
# (tests/oot_plugins.sh). libr4d is included when the tree built it, with the same HIP compiler,
|
||||||
# targets. Labelled `oot`: it rebuilds every plugin and takes minutes.
|
# targets and RAD_HIP_VOPD_REPEATABLE. Labelled `oot`: it rebuilds every plugin and takes minutes.
|
||||||
set(RAD_OOT_HIP "")
|
set(RAD_OOT_HIP "")
|
||||||
if(RAD_HIP_FOUND AND TARGET libr4d)
|
if(RAD_HIP_FOUND AND TARGET libr4d)
|
||||||
get_target_property(RAD_OOT_R4D_ARCH libr4d HIP_ARCHITECTURES)
|
get_target_property(RAD_OOT_R4D_ARCH libr4d HIP_ARCHITECTURES)
|
||||||
string(REPLACE ";" "\\;" RAD_OOT_R4D_ARCH "${RAD_OOT_R4D_ARCH}")
|
string(REPLACE ";" "\\;" RAD_OOT_R4D_ARCH "${RAD_OOT_R4D_ARCH}")
|
||||||
set(RAD_OOT_HIP ${CMAKE_HIP_COMPILER} "${RAD_OOT_R4D_ARCH}")
|
set(RAD_OOT_HIP ${CMAKE_HIP_COMPILER} "${RAD_OOT_R4D_ARCH}" ${RAD_HIP_VOPD_REPEATABLE})
|
||||||
endif()
|
endif()
|
||||||
add_test(NAME oot_plugins
|
add_test(NAME oot_plugins
|
||||||
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/oot_plugins.sh
|
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/oot_plugins.sh
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# oot_plugins.sh BUILD SOURCE WORK [HIP_COMPILER HIP_TARGETS]
|
# oot_plugins.sh BUILD SOURCE WORK [HIP_COMPILER HIP_TARGETS [VOPD_REPEATABLE]]
|
||||||
#
|
#
|
||||||
# THE PLUGINS RADIANCE SHIPS, BUILT THE WAY A THIRD PARTY BUILDS THEIRS. The tree's build is
|
# THE PLUGINS RADIANCE SHIPS, BUILT THE WAY A THIRD PARTY BUILDS THEIRS. The tree's build is
|
||||||
# installed into a prefix; then every plugin directory -- the kernel libraries, the quantisers,
|
# installed into a prefix; then every plugin directory -- the kernel libraries, the quantisers,
|
||||||
@@ -19,13 +19,14 @@
|
|||||||
# every host library implements (a norm, the fp8 activation quantiser, a gated activation)
|
# every host library implements (a norm, the fp8 activation quantiser, a gated activation)
|
||||||
# are enough;
|
# are enough;
|
||||||
# 5. with HIP_COMPILER given, the device library the tree built (libr4d) is built out of tree
|
# 5. with HIP_COMPILER given, the device library the tree built (libr4d) is built out of tree
|
||||||
# too, for HIP_TARGETS, and compiles to the tree's device code. A replay of a device library
|
# too, for HIP_TARGETS and at the tree's RAD_HIP_VOPD_REPEATABLE (VOPD_REPEATABLE, default
|
||||||
# needs a card, and this test must not touch one a server is using; the same instructions mean
|
# OFF; on LLVM 24 it decides whether VOPD pairs, so it changes the code), and compiles to the
|
||||||
# the tree's own GPU suite (ctest -L gpu) has already checked what the out-of-tree build
|
# tree's device code. A replay of a device library needs a card, and this test must not touch
|
||||||
# produced.
|
# one a server is using; the same instructions mean the tree's own GPU suite (ctest -L gpu)
|
||||||
|
# has already checked what the out-of-tree build produced.
|
||||||
set -eu
|
set -eu
|
||||||
B=$1; S=$2; W=$3
|
B=$1; S=$2; W=$3
|
||||||
HIPC=${4:-}; HIPT=${5:-}
|
HIPC=${4:-}; HIPT=${5:-}; VOPD=${6:-OFF}
|
||||||
GEN=${CMAKE_GENERATOR:-Ninja}
|
GEN=${CMAKE_GENERATOR:-Ninja}
|
||||||
J=${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc 2>/dev/null || echo 4)}
|
J=${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc 2>/dev/null || echo 4)}
|
||||||
|
|
||||||
@@ -62,7 +63,8 @@ for d in $dirs; do
|
|||||||
n=$(basename "$d")
|
n=$(basename "$d")
|
||||||
say "building $d against the installed package"
|
say "building $d against the installed package"
|
||||||
extra=""
|
extra=""
|
||||||
is_dev "$n" && extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT"
|
is_dev "$n" && extra="-DCMAKE_HIP_COMPILER=$HIPC -DRAD_GPU_TARGETS=$HIPT
|
||||||
|
-DRAD_HIP_VOPD_REPEATABLE=$VOPD"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
run "$W/logs/$n.configure.log" cmake -S "$S/$d" -B "$W/b/$n" -G "$GEN" \
|
run "$W/logs/$n.configure.log" cmake -S "$S/$d" -B "$W/b/$n" -G "$GEN" \
|
||||||
-DCMAKE_PREFIX_PATH="$P" -DRAD_PLUGIN_INSTALL_HOME="$H" $extra
|
-DCMAKE_PREFIX_PATH="$P" -DRAD_PLUGIN_INSTALL_HOME="$H" $extra
|
||||||
|
|||||||
Reference in new issue
Block a user