Skip to content

Commit 47a7503

Browse files
authored
[HIP] fix test_blender.sh.in (#132)
Fix command to extract clang hash. Fix blender command: -F needs to precede -o option to be effective.
1 parent ab4277b commit 47a7503

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

External/HIP/workload/blender/test_blender.sh.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export CCC_OVERRIDE_OPTIONS=${HIP_BLENDER_TEST_CCC_OVERRIDE_OPTIONS:-"+-v"}
88
export HIP_CLANG_PATH=${HIP_CLANG_PATH:-"@HIP_CLANG_PATH@"}
99
export HIPCC_VERBOSE=${HIPCC_VERBOSE:-7}
1010

11-
blender_options=${HIP_BLENDER_TEST_OPTIONS:-"-F PNG --debug-cycles -- --cycles-device HIP"}
11+
blender_options=${HIP_BLENDER_TEST_OPTIONS:-"--debug-cycles -- --cycles-device HIP"}
1212
blender_dir=${HIP_BLENDER_TEST_BIN_DIR:-"$TEST_SUITE_HIP_ROOT/blender"}
1313
scene_dir=${HIP_BLENDER_TEST_SCENES_DIR:-"$TEST_SUITE_HIP_ROOT/Blender_Scenes"}
1414
log_dir=${HIP_BLENDER_TEST_LOG_DIR:-"$scene_dir/logs"}
@@ -20,7 +20,7 @@ clang_hash=""
2020

2121
get_clang_hash() {
2222
clang_version_output=$($HIP_CLANG_PATH/clang -v 2>&1)
23-
clang_hash=$(echo "$clang_version_output" | grep -oP '(?<=llvm-project )\w{8}')
23+
clang_hash=$(echo "$clang_version_output" | sed -n 's/^clang version.*(.* \([0-9a-f]\+\)).*/\1/p' | cut -c1-8)
2424
echo "$clang_hash"
2525
}
2626

@@ -63,7 +63,7 @@ render() {
6363
echo "Render $input"
6464

6565
blender_output=$(mktemp)
66-
timeout 300 $blender_dir/blender -b $input -o ${output}### -f $frame $blender_options 2>&1 | tee $blender_output
66+
timeout 300 $blender_dir/blender -b $input -F PNG -o ${output}### -f $frame $blender_options 2>&1 | tee $blender_output
6767
blender_return_code=${PIPESTATUS[0]}
6868

6969
average_time=$(grep -P "^\s*Path Tracing\s+\d+\.\d+\s+\d+\.\d+" $blender_output | awk '{print $4}')

0 commit comments

Comments
 (0)