Skip to content
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
34 changes: 21 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,32 +60,36 @@ jobs:

# Clone gpgpu-sim with fork-aware branch selection
echo "Cloning gpgpu-sim with fork-aware branch selection..."
git clone --quiet https://github.com/accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
git clone --quiet git@github.com:accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim

# Try to checkout the same branch from the same owner's fork first
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
current_owner=$(echo ${{ github.event.pull_request.head.repo.full_name }} | cut -d'/' -f1)
else
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
fi
current_repo=$(echo ${{ github.repository }} | cut -d'/' -f2)

gpgpusim_repo=$(echo $current_repo | sed 's/accel-sim-framework/gpgpu-sim_distribution/')

echo "Attempting to checkout branch '$BRANCH_NAME' from '$current_owner/$gpgpusim_repo'"

# First, try to add the fork owner's repository as a remote and check if the branch exists
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner https://github.com/$current_owner/$gpgpusim_repo.git 2>/dev/null; then
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner git@github.com:$current_owner/$gpgpusim_repo.git 2>/dev/null; then
# Check if the branch exists in the fork owner's repository
if git -C ./gpu-simulator/gpgpu-sim/ ls-remote fork-owner | grep -q "refs/heads/$BRANCH_NAME"; then
echo "Found branch '$BRANCH_NAME' in '$current_owner/$gpgpusim_repo' repository, checking it out"
git -C ./gpu-simulator/gpgpu-sim/ fetch fork-owner
git -C ./gpu-simulator/gpgpu-sim/ checkout -b $BRANCH_NAME fork-owner/$BRANCH_NAME
git -C ./gpu-simulator/gpgpu-sim/ checkout -B $BRANCH_NAME fork-owner/$BRANCH_NAME
else
echo "Branch '$BRANCH_NAME' not found in '$current_owner/$gpgpusim_repo' repository, falling back to upstream dev branch"
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
fi
# Remove the temporary remote
git -C ./gpu-simulator/gpgpu-sim/ remote remove fork-owner
else
echo "Could not add '$current_owner/$gpgpusim_repo' remote, falling back to upstream dev branch"
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
fi

source ./gpu-simulator/setup_environment.sh
Expand Down Expand Up @@ -194,10 +198,14 @@ jobs:

# Clone gpgpu-sim with fork-aware branch selection
echo "Cloning gpgpu-sim with fork-aware branch selection..."
git clone --quiet https://github.com/accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
git clone --quiet git@github.com:accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim

# Try to checkout the same branch from the same owner's fork first
current_owner=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
current_owner=$(echo ${{ github.event.pull_request.head.repo.full_name }} | cut -d'/' -f1)
else
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
fi
current_branch=$BRANCH_NAME
current_repo=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)

Expand All @@ -206,21 +214,21 @@ jobs:
echo "Attempting to checkout branch '$BRANCH_NAME' from '$current_owner/$gpgpusim_repo'"

# First, try to add the fork owner's repository as a remote and check if the branch exists
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner https://github.com/$current_owner/$gpgpusim_repo.git 2>/dev/null; then
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner git@github.com:$current_owner/$gpgpusim_repo.git 2>/dev/null; then
# Check if the branch exists in the fork owner's repository
if git -C ./gpu-simulator/gpgpu-sim/ ls-remote fork-owner | grep -q "refs/heads/$BRANCH_NAME"; then
echo "Found branch '$BRANCH_NAME' in '$current_owner/$gpgpusim_repo' repository, checking it out"
git -C ./gpu-simulator/gpgpu-sim/ fetch fork-owner
git -C ./gpu-simulator/gpgpu-sim/ checkout -b $BRANCH_NAME fork-owner/$BRANCH_NAME
git -C ./gpu-simulator/gpgpu-sim/ checkout -B $BRANCH_NAME fork-owner/$BRANCH_NAME
else
echo "Branch '$BRANCH_NAME' not found in '$current_owner/$gpgpusim_repo' repository, falling back to accel-sim dev branch"
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
fi
# Remove the temporary remote
git -C ./gpu-simulator/gpgpu-sim/ remote remove fork-owner
else
echo "Could not add '$current_owner/$gpgpusim_repo' remote, falling back to upstream dev branch"
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
fi

source ./gpu-simulator/setup_environment.sh
Expand Down Expand Up @@ -291,7 +299,7 @@ jobs:
source ./env-setup/12.8_env_setup.sh
source ./gpu-app-collection/src/setup_environment
rm -rf ./hw_run/
./util/tracer_nvbit/run_hw_trace.py -B rodinia_2.0-ft -D 7 --spinlock_handling none
./util/tracer_nvbit/run_hw_trace.py -B rodinia_2.0-ft -D 7
- name: generate-rodinia_2.0-ft-hw_stats
run: |
source ./env-setup/12.8_env_setup.sh
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
Tracer-Weekly:
if: github.repository == 'accel-sim/accel-sim-framework'
if: ${{ github.repository == 'accel-sim/accel-sim-framework' || github.event_name == 'workflow_dispatch' }}
runs-on: tgrogers-gpu01
defaults:
run:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Setup Environment
run: |
rm -rf env-setup
git clone [email protected]:purdue-aalp/env-setup.git
git clone --quiet [email protected]:purdue-aalp/env-setup.git
cd env-setup
git checkout cluster-ubuntu
- name: Build Tracer
Expand All @@ -34,7 +34,8 @@ jobs:
source ./env-setup/12.8_env_setup.sh
export PATH=/home/tgrogers-raid/a/common/python2:$PATH
rm -rf ./gpu-app-collection/
git clone --recursive [email protected]:accel-sim/gpu-app-collection.git
git clone --quiet [email protected]:accel-sim/gpu-app-collection.git
git -C ./gpu-app-collection/ submodule update --init -- ./src/cuda/cuda-samples
source ./gpu-app-collection/src/setup_environment
ln -s /home/tgrogers-raid/a/common/data_dirs ./gpu-app-collection/
make -j8 -C ./gpu-app-collection/src rodinia-3.1
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:
# ./util/job_launching/monitor_func_test.py -I -v -s spinlock-stats-per-app.csv -N spinlock-microbenchmark-$$-none
SASS-Weekly:
needs: [Tracer-Weekly]
if: github.repository == 'accel-sim/accel-sim-framework'
if: ${{ github.repository == 'accel-sim/accel-sim-framework' || github.event_name == 'workflow_dispatch' }}
runs-on: tgrogers-raid
defaults:
run:
Expand All @@ -85,7 +86,7 @@ jobs:
- name: Setup Environment
run: |
rm -rf env-setup
git clone [email protected]:purdue-aalp/env-setup.git
git clone --quiet [email protected]:purdue-aalp/env-setup.git
cd env-setup
git checkout cluster-ubuntu
- name: Build Accel-Sim
Expand All @@ -100,6 +101,6 @@ jobs:
source ./env-setup/12.8_env_setup.sh
source ./gpu-simulator/setup_environment.sh
ln -s /scratch/tgrogers-disk01/a/common/for-sharing/$USER/nightly-traces ./hw_run
# ./util/job_launching/run_simulations.py -B rodinia-3.1,GPU_Microbenchmark,sdk-4.2-scaled,parboil,polybench,cutlass_5_trace,Deepbench_nvidia_tencore,Deepbench_nvidia_normal -C QV100-SASS-5B_INSN -T ./hw_run/traces/device-7/11.7 -N weekly-$$ -M 70G
./util/job_launching/run_simulations.py -B rodinia-3.1,GPU_Microbenchmark -C QV100-SASS-5B_INSN -T ./hw_run/traces/device-7/11.7 -N weekly-$$ -M 70G
# ./util/job_launching/run_simulations.py -B rodinia-3.1,GPU_Microbenchmark,sdk-4.2-scaled,parboil,polybench,cutlass_5_trace,Deepbench_nvidia_tencore,Deepbench_nvidia_normal -C QV100-SASS-5B_INSN -T ./hw_run/traces/device-7/12.8 -N weekly-$$ -M 70G
./util/job_launching/run_simulations.py -B rodinia-3.1,GPU_Microbenchmark -C QV100-SASS-5B_INSN -T ./hw_run/traces/device-7/12.8 -N weekly-$$ -M 70G
./util/job_launching/monitor_func_test.py -T 12 -S 1800 -I -v -s weekly-stats-per-app.csv -N weekly-$$
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Welcome to the top-level repo of Accel-Sim and AccelWattch
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/accel-sim/accel-sim-framework)
[![Long Tests](https://github.com/accel-sim/accel-sim-framework/actions/workflows/long-tests.yml/badge.svg)](https://github.com/accel-sim/accel-sim-framework/actions/workflows/long-tests.yml)
[![Short Tests](https://github.com/accel-sim/accel-sim-framework/actions/workflows/short-tests.yml/badge.svg)](https://github.com/accel-sim/accel-sim-framework/actions/workflows/short-tests.yml)
[![Tracer Tool](https://github.com/accel-sim/accel-sim-framework/actions/workflows/tracer-tool.yml/badge.svg)](https://github.com/accel-sim/accel-sim-framework/actions/workflows/tracer-tool.yml)
[![CI Runs](https://github.com/accel-sim/accel-sim-framework/actions/workflows/main.yml/badge.svg?branch=dev&event=push)](https://github.com/accel-sim/accel-sim-framework/actions/workflows/main.yml)
[![Weekly Tests](https://github.com/accel-sim/accel-sim-framework/actions/workflows/weekly.yml/badge.svg)](https://github.com/accel-sim/accel-sim-framework/actions/workflows/weekly.yml)
- [Welcome to the top-level repo of Accel-Sim and AccelWattch](#welcome-to-the-top-level-repo-of-accel-sim-and-accelwattch)
- [Dependencies](#dependencies)
Expand Down
Loading