Skip to content

Commit

Permalink
test hip with librandomize_readdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Snektron committed Nov 26, 2024
1 parent a7b2867 commit 84c025c
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ jobs:
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
hip:
# Probably wouldn't matter anyway since we run in a container, but staying
# Probably wouldn't matter anyway since we run in a container, but staying
# close to the version is better than not.
runs-on: ubuntu-22.04
needs: build
Expand All @@ -586,9 +586,11 @@ jobs:
env:
# SCCACHE_GHA_ENABLED: "on"
ROCM_PATH: "/opt/rocm"
# LD_PRELOAD: target/debug/librandomize_readdir.so

steps:
- uses: actions/checkout@v4
- name: Clone repository
uses: actions/checkout@v4

# I don't want to break the cache during testing. Will turn on after I
# make sure it's working.
Expand All @@ -606,44 +608,62 @@ jobs:
# script: |
# core.exportVariable('ROCM_PATH', process.env.ROCM_PATH || '');

- name: Install dependencies
shell: bash
run: |
## Install dependencies
sudo apt-get update
sudo apt-get install -y cmake curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install rust
uses: ./.github/actions/rust-toolchain
with:
toolchain: "stable"

- name: Build & setup librandomize_readdir
run: |
cargo build -p randomize_readdir
- uses: actions/download-artifact@v4
with:
name: integration-tests
path: /home/runner/.cargo/bin/
- name: Chmod for binary
run: chmod +x ${SCCACHE_PATH}

- name: Install dependencies
shell: bash
run: |
## Install dependencies
sudo apt-get update
sudo apt-get install -y cmake
# Ensure that HIPCC isn't already borken
- name: Sanity Check
run: |
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
echo $LD_PRELOAD
file $PWD/target/debug/librandomize_readdir.so
file $LD_PRELOAD
hipcc -o vectoradd_hip --offload-arch=gfx900 tests/cmake-hip/vectoradd_hip.cpp
- name: Test
run: |
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
cmake --build build
- name: Output
run: |
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
${SCCACHE_PATH} --show-stats
- name: Test Twice for Cache Read
run: |
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
rm -rf build
cmake -B build -S tests/cmake-hip -DCMAKE_HIP_COMPILER_LAUNCHER=${SCCACHE_PATH} -DCMAKE_HIP_ARCHITECTURES=gfx900
cmake --build build
- name: Output
run: |
export LD_PRELOAD=$PWD/target/debug/librandomize_readdir.so
${SCCACHE_PATH} --show-stats
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
Expand Down

0 comments on commit 84c025c

Please sign in to comment.