Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update HIPCC to preserve ordering #899

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading