Skip to content

Commit 830d179

Browse files
committed
ci updates
1 parent 96d7923 commit 830d179

File tree

2 files changed

+29
-38
lines changed

2 files changed

+29
-38
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,32 +60,36 @@ jobs:
6060
6161
# Clone gpgpu-sim with fork-aware branch selection
6262
echo "Cloning gpgpu-sim with fork-aware branch selection..."
63-
git clone --quiet https://github.com/accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
63+
git clone --quiet git@github.com:accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
6464
6565
# Try to checkout the same branch from the same owner's fork first
66-
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
66+
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
67+
current_owner=${{ github.event.pull_request.head.repo.full_name }}
68+
else
69+
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
70+
fi
6771
current_repo=$(echo ${{ github.repository }} | cut -d'/' -f2)
6872
6973
gpgpusim_repo=$(echo $current_repo | sed 's/accel-sim-framework/gpgpu-sim_distribution/')
7074
7175
echo "Attempting to checkout branch '$BRANCH_NAME' from '$current_owner/$gpgpusim_repo'"
7276
7377
# First, try to add the fork owner's repository as a remote and check if the branch exists
74-
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner https://github.com/$current_owner/$gpgpusim_repo.git 2>/dev/null; then
78+
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner git@github.com:$current_owner/$gpgpusim_repo.git 2>/dev/null; then
7579
# Check if the branch exists in the fork owner's repository
7680
if git -C ./gpu-simulator/gpgpu-sim/ ls-remote fork-owner | grep -q "refs/heads/$BRANCH_NAME"; then
7781
echo "Found branch '$BRANCH_NAME' in '$current_owner/$gpgpusim_repo' repository, checking it out"
7882
git -C ./gpu-simulator/gpgpu-sim/ fetch fork-owner
79-
git -C ./gpu-simulator/gpgpu-sim/ checkout -b $BRANCH_NAME fork-owner/$BRANCH_NAME
83+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B $BRANCH_NAME fork-owner/$BRANCH_NAME
8084
else
8185
echo "Branch '$BRANCH_NAME' not found in '$current_owner/$gpgpusim_repo' repository, falling back to upstream dev branch"
82-
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
86+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
8387
fi
8488
# Remove the temporary remote
8589
git -C ./gpu-simulator/gpgpu-sim/ remote remove fork-owner
8690
else
8791
echo "Could not add '$current_owner/$gpgpusim_repo' remote, falling back to upstream dev branch"
88-
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
92+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
8993
fi
9094
9195
source ./gpu-simulator/setup_environment.sh
@@ -194,10 +198,14 @@ jobs:
194198
195199
# Clone gpgpu-sim with fork-aware branch selection
196200
echo "Cloning gpgpu-sim with fork-aware branch selection..."
197-
git clone --quiet https://github.com/accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
201+
git clone --quiet git@github.com:accel-sim/gpgpu-sim_distribution.git ./gpu-simulator/gpgpu-sim
198202
199203
# Try to checkout the same branch from the same owner's fork first
200-
current_owner=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
204+
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
205+
current_owner=${{ github.event.pull_request.head.repo.full_name }}
206+
else
207+
current_owner=$(echo ${{ github.repository }} | cut -d'/' -f1)
208+
fi
201209
current_branch=$BRANCH_NAME
202210
current_repo=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
203211
@@ -206,21 +214,21 @@ jobs:
206214
echo "Attempting to checkout branch '$BRANCH_NAME' from '$current_owner/$gpgpusim_repo'"
207215
208216
# First, try to add the fork owner's repository as a remote and check if the branch exists
209-
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner https://github.com/$current_owner/$gpgpusim_repo.git 2>/dev/null; then
217+
if git -C ./gpu-simulator/gpgpu-sim/ remote add fork-owner git@github.com:$current_owner/$gpgpusim_repo.git 2>/dev/null; then
210218
# Check if the branch exists in the fork owner's repository
211219
if git -C ./gpu-simulator/gpgpu-sim/ ls-remote fork-owner | grep -q "refs/heads/$BRANCH_NAME"; then
212220
echo "Found branch '$BRANCH_NAME' in '$current_owner/$gpgpusim_repo' repository, checking it out"
213221
git -C ./gpu-simulator/gpgpu-sim/ fetch fork-owner
214-
git -C ./gpu-simulator/gpgpu-sim/ checkout -b $BRANCH_NAME fork-owner/$BRANCH_NAME
222+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B $BRANCH_NAME fork-owner/$BRANCH_NAME
215223
else
216224
echo "Branch '$BRANCH_NAME' not found in '$current_owner/$gpgpusim_repo' repository, falling back to accel-sim dev branch"
217-
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
225+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
218226
fi
219227
# Remove the temporary remote
220228
git -C ./gpu-simulator/gpgpu-sim/ remote remove fork-owner
221229
else
222230
echo "Could not add '$current_owner/$gpgpusim_repo' remote, falling back to upstream dev branch"
223-
git -C ./gpu-simulator/gpgpu-sim/ checkout dev
231+
git -C ./gpu-simulator/gpgpu-sim/ checkout -B dev origin/dev
224232
fi
225233
226234
source ./gpu-simulator/setup_environment.sh
@@ -291,7 +299,7 @@ jobs:
291299
source ./env-setup/12.8_env_setup.sh
292300
source ./gpu-app-collection/src/setup_environment
293301
rm -rf ./hw_run/
294-
./util/tracer_nvbit/run_hw_trace.py -B rodinia_2.0-ft -D 7 --spinlock_handling none
302+
./util/tracer_nvbit/run_hw_trace.py -B rodinia_2.0-ft -D 7
295303
- name: generate-rodinia_2.0-ft-hw_stats
296304
run: |
297305
source ./env-setup/12.8_env_setup.sh

.github/workflows/weekly.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
Tracer-Weekly:
11-
if: github.repository == 'accel-sim/accel-sim-framework'
11+
if: ${{ github.repository == 'accel-sim/accel-sim-framework' || github.event_name == 'workflow_dispatch' }}
1212
runs-on: tgrogers-gpu01
1313
defaults:
1414
run:
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Environment
2121
run: |
2222
rm -rf env-setup
23-
git clone [email protected]:purdue-aalp/env-setup.git
23+
git clone --quiet [email protected]:purdue-aalp/env-setup.git
2424
cd env-setup
2525
git checkout cluster-ubuntu
2626
- name: Build Tracer
@@ -34,7 +34,8 @@ jobs:
3434
source ./env-setup/12.8_env_setup.sh
3535
export PATH=/home/tgrogers-raid/a/common/python2:$PATH
3636
rm -rf ./gpu-app-collection/
37-
git clone --recursive [email protected]:accel-sim/gpu-app-collection.git
37+
git clone --quiet [email protected]:accel-sim/gpu-app-collection.git
38+
git -C ./gpu-app-collection/ submodule update --init -- ./src/cuda/cuda-samples
3839
source ./gpu-app-collection/src/setup_environment
3940
ln -s /home/tgrogers-raid/a/common/data_dirs ./gpu-app-collection/
4041
make -j8 -C ./gpu-app-collection/src rodinia-3.1
@@ -53,27 +54,9 @@ jobs:
5354
ln -s /scratch/tgrogers-disk01/a/common/for-sharing/$USER/nightly-traces ./hw_run
5455
./util/tracer_nvbit/run_hw_trace.py -B rodinia-3.1,GPU_Microbenchmark -D 7
5556
# ./util/tracer_nvbit/run_hw_trace.py -B rodinia-3.1,GPU_Microbenchmark,parboil,polybench,cutlass_5_trace,Deepbench_nvidia_tencore,Deepbench_nvidia_normal -D 7
56-
- name: generate-spinlock-traces-spinlock_handling
57-
run: |
58-
source ./env-setup/12.8_env_setup.sh
59-
source ./gpu-app-collection/src/setup_environment
60-
rm -rf ./hw_run/
61-
./util/tracer_nvbit/run_hw_trace.py -B Spinlock -D 7 --spinlock_handling fast_forward
62-
mv ./hw_run ./hw_run_fast_forward
63-
./util/tracer_nvbit/run_hw_trace.py -B Spinlock -D 7 --spinlock_handling none
64-
mv ./hw_run ./hw_run_none
65-
- name: test-new-traces-spinlock_handling
66-
# Test only fast-forwarded traces as the none one takes too long to run (~2-3 hr)
67-
run: |
68-
source ./env-setup/12.8_env_setup.sh
69-
source ./gpu-simulator/setup_environment.sh
70-
./util/job_launching/run_simulations.py -B Spinlock -C QV100-SASS -T ./hw_run_fast_forward/traces/device-7/ -N spinlock-microbenchmark-$$-fast_forward
71-
./util/job_launching/monitor_func_test.py -I -v -s spinlock-stats-per-app.csv -N spinlock-microbenchmark-$$-fast_forward
72-
# ./util/job_launching/run_simulations.py -B Spinlock -C QV100-SASS -T ./hw_run_none/traces/device-7/ -N spinlock-microbenchmark-$$-none
73-
# ./util/job_launching/monitor_func_test.py -I -v -s spinlock-stats-per-app.csv -N spinlock-microbenchmark-$$-none
7457
SASS-Weekly:
7558
needs: [Tracer-Weekly]
76-
if: github.repository == 'accel-sim/accel-sim-framework'
59+
if: ${{ github.repository == 'accel-sim/accel-sim-framework' || github.event_name == 'workflow_dispatch' }}
7760
runs-on: tgrogers-raid
7861
defaults:
7962
run:
@@ -85,7 +68,7 @@ jobs:
8568
- name: Setup Environment
8669
run: |
8770
rm -rf env-setup
88-
git clone [email protected]:purdue-aalp/env-setup.git
71+
git clone --quiet [email protected]:purdue-aalp/env-setup.git
8972
cd env-setup
9073
git checkout cluster-ubuntu
9174
- name: Build Accel-Sim
@@ -100,6 +83,6 @@ jobs:
10083
source ./env-setup/12.8_env_setup.sh
10184
source ./gpu-simulator/setup_environment.sh
10285
ln -s /scratch/tgrogers-disk01/a/common/for-sharing/$USER/nightly-traces ./hw_run
103-
# ./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
104-
./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
86+
# ./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
87+
./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
10588
./util/job_launching/monitor_func_test.py -T 12 -S 1800 -I -v -s weekly-stats-per-app.csv -N weekly-$$

0 commit comments

Comments
 (0)