@@ -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
0 commit comments