Skip to content

Commit dc7bbdd

Browse files
committed
test hip with librandomize_readdir
1 parent 5567931 commit dc7bbdd

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

.github/workflows/integration-tests.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ jobs:
576576
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
577577
578578
hip:
579-
# Probably wouldn't matter anyway since we run in a container, but staying
579+
# Probably wouldn't matter anyway since we run in a container, but staying
580580
# close to the version is better than not.
581581
runs-on: ubuntu-22.04
582582
needs: build
@@ -588,7 +588,8 @@ jobs:
588588
ROCM_PATH: "/opt/rocm"
589589

590590
steps:
591-
- uses: actions/checkout@v4
591+
- name: Clone repository
592+
uses: actions/checkout@v4
592593

593594
# I don't want to break the cache during testing. Will turn on after I
594595
# make sure it's working.
@@ -606,44 +607,59 @@ jobs:
606607
# script: |
607608
# core.exportVariable('ROCM_PATH', process.env.ROCM_PATH || '');
608609

610+
- name: Install dependencies
611+
shell: bash
612+
run: |
613+
## Install dependencies
614+
sudo apt-get update
615+
sudo apt-get install -y cmake curl
616+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
617+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
618+
619+
- name: Install rust
620+
uses: ./.github/actions/rust-toolchain
621+
with:
622+
toolchain: "stable"
623+
624+
- name: Build & setup librandomize_readdir
625+
run: |
626+
cargo build -p randomize_readdir
627+
609628
- uses: actions/download-artifact@v4
610629
with:
611630
name: integration-tests
612631
path: /home/runner/.cargo/bin/
613632
- name: Chmod for binary
614633
run: chmod +x ${SCCACHE_PATH}
615634

616-
- name: Install dependencies
617-
shell: bash
618-
run: |
619-
## Install dependencies
620-
sudo apt-get update
621-
sudo apt-get install -y cmake
622-
623635
# Ensure that HIPCC isn't already borken
624636
- name: Sanity Check
625637
run: |
638+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
626639
hipcc -o vectoradd_hip --offload-arch=gfx900 tests/cmake-hip/vectoradd_hip.cpp
627640
628641
- name: Test
629642
run: |
643+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
630644
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
631645
cmake --build build
632646
633647
- name: Output
634648
run: |
649+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
635650
${SCCACHE_PATH} --show-stats
636651
637652
- name: Test Twice for Cache Read
638653
run: |
654+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
639655
rm -rf build
640656
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
641657
cmake --build build
642658
643659
- name: Output
644660
run: |
661+
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
645662
${SCCACHE_PATH} --show-stats
646-
647663
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
648664
649665

0 commit comments

Comments
 (0)