Skip to content

Commit

Permalink
Merge pull request #899 from CHIP-SPV/fix-898
Browse files Browse the repository at this point in the history
update HIPCC to preserve ordering
  • Loading branch information
pvelesko authored Jul 30, 2024
2 parents 56a5dfc + 3f9fa98 commit 163015d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HIPCC
Submodule HIPCC updated 1 files
+10 −2 src/hipBin_spirv.h
1 change: 1 addition & 0 deletions tests/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ add_shell_test(TestWholeProgramCompilation.bash)
add_shell_test(TestHipccDashX.bash)
add_shell_test(TestHipccFp16Include.bash)
add_shell_test(TestHipcc692Regression.bash)
add_shell_test(TestHipccFileOrderPreservation.bash)

add_test(NAME "TestHipccMultiSource" COMMAND
${CMAKE_BINARY_DIR}/bin/hipcc ${CMAKE_CURRENT_SOURCE_DIR}/TestHipccCompileThenLinkMain.cpp ${CMAKE_CURRENT_SOURCE_DIR}/TestHipccCompileThenLinkKernel.cpp -o TestHipccMultiSource)
Expand Down
26 changes: 26 additions & 0 deletions tests/compiler/TestHipccFileOrderPreservation.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -e

HIPCC=@CMAKE_BINARY_DIR@/bin/hipcc

# Create dummy input files
touch main.o meshBasis.o
mkdir -p BlasLapack
touch BlasLapack/libBlasLapack.a

# Run hipcc with the specified order
$HIPCC ./main.o ./meshBasis.o ./BlasLapack/libBlasLapack.a -v 2>&1 | tee hipcc_output.log

# Check if the order is preserved in the output
if grep -q "main.o.*meshBasis.o.*BlasLapack/libBlasLapack.a" hipcc_output.log; then
echo "Test passed: File order is preserved"
exit 0
else
echo "Test failed: File order is not preserved"
exit 1
fi

# Clean up
rm -f main.o meshBasis.o hipcc_output.log
rm -rf BlasLapack

0 comments on commit 163015d

Please sign in to comment.