Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SST integration into gpgpusim #44

Open
wants to merge 80 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
c6349f3
Add accommodations to run gpgpusim with SST simulation framework thro…
William-An Feb 10, 2023
e30f0f1
Output setup_environment options when sourcing
William-An Feb 10, 2023
3c06df0
Add SST directive check when creating sim thread
William-An Feb 10, 2023
1b44d81
Merge branch 'dev' into sst-integration
William-An Feb 16, 2023
2f71bd7
Add sst side test for jenkins
William-An Mar 24, 2023
ba6da73
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Mar 24, 2023
0c89737
sst-integration: update Jenkinsfile with offical sst-elements repo an…
William-An Apr 8, 2023
ec2a9fb
sst-integration: direct jenkins to rebuild gpgpusim before testing fo…
William-An Apr 8, 2023
93587eb
sst-integration: fix bugs in sst repos config
William-An Apr 8, 2023
8c9f546
sst-integration: let Jenkins rebuilds simulator
William-An Apr 8, 2023
549c5f1
sst-integration: Update Jenkinsfile to source env vars when running b…
William-An Apr 12, 2023
a184b49
Merge branch 'dev' into sst-integration
William-An Aug 14, 2023
495442a
sst-integration: refactor code to remove __SST__ flag
William-An Aug 28, 2023
d0e0d51
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Aug 28, 2023
1d13c35
sst-integration: fix a bug that init cluster twice for sst
William-An Aug 28, 2023
8aa01e4
sst-integration: fix a bug of not sending mem packets to SST
William-An Aug 29, 2023
9447914
sst-integration: remove sst flags from makefiles and setup_env
William-An Aug 29, 2023
5c8afb9
sst-integration: add comments to SST changes
William-An Aug 29, 2023
302e102
Merge branch 'dev' into sst-integration
William-An Aug 30, 2023
7b0fdd3
sst-integration: remove rebuilding simulator in jenkins when testing …
William-An Aug 30, 2023
828d59c
sst-integration: revert simulator build script
William-An Aug 31, 2023
e644167
Merge branch 'dev' into sst-integration
William-An Sep 25, 2023
e94d6a2
Add a function to support querying function argument info for SST
William-An Jan 22, 2024
0de379e
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Jan 22, 2024
21fc7f8
Merge branch 'dev' into sst-integration
William-An Feb 10, 2024
412c476
sst-integration: add version detection for vanadis binary
William-An Feb 22, 2024
bac615b
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Feb 22, 2024
4100787
Merge branch 'dev' into sst-integration
William-An Aug 20, 2024
0a2bab7
Automated Format
purdue-jenkins Aug 20, 2024
5e3fc36
add version detection support for gcc 10+
William-An Aug 21, 2024
a39b567
sst-integration: add cudaMallocHost for SST
William-An Aug 21, 2024
24a252a
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Aug 21, 2024
30bd8a5
sst-integration: fix a compilation bug
William-An Aug 21, 2024
4dc72a2
sst-integration: add sst balar unittest CI
William-An Aug 23, 2024
4b924ed
sst-integration: specify GPU_ARCH for CI test
William-An Aug 23, 2024
9a47a64
sst-integration: use bash for github actions
William-An Aug 24, 2024
fce9a47
sst-integration: use https links for sst repos
William-An Aug 24, 2024
41d43fa
sst-integration: add SST dependencies to CI config
William-An Aug 24, 2024
981af7f
sst-integration: remove sudo
William-An Aug 24, 2024
d6c7d40
sst-integration: default to yes for apt install
William-An Aug 24, 2024
009054f
sst-integration: add manual trigger for github action
William-An Aug 24, 2024
bd206e2
sst-integration: remove wrong on event
William-An Aug 24, 2024
7152348
sst-integration: limit CPU usage for compilation
William-An Aug 24, 2024
e52ea6a
sst-integration: fix wrong path
William-An Aug 24, 2024
458fae2
sst-integration: use personal repo for testing
William-An Aug 25, 2024
fb97026
sst-integration: remove sst-core source in CI to free space
William-An Aug 25, 2024
b6f697e
Merge branch 'dev' into sst-integration
William-An Aug 25, 2024
7dc2bb2
sst-integration: SST_Cycle use print stats with stream id
William-An Aug 25, 2024
5579412
Automated Format
purdue-jenkins Aug 25, 2024
4d05476
sst-integration: check for diskspace and try to clean it
William-An Aug 25, 2024
d536bb4
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Aug 25, 2024
20898ea
sst-integration: move out of docker image
William-An Aug 27, 2024
0d52fe5
sst-integration: testing for ci path
William-An Aug 27, 2024
2be1c7f
sst-integration: fix syntax
William-An Aug 27, 2024
6f1ff10
sst-integration: pass env vars
William-An Aug 27, 2024
b6188f4
sst-integration: set env properly
William-An Aug 27, 2024
fade4e5
sst-integration: merge LLVM build and test into same job
William-An Aug 27, 2024
0e2b1cf
sst-integration: fix step order
William-An Aug 28, 2024
8f7e81e
sst-integration: checkout correct branch for env-setup
William-An Aug 28, 2024
8f567e2
sst-integration: remove resourcing gpu apps
William-An Aug 28, 2024
aabed5d
sst-integration: revert back to docker github action
William-An Aug 29, 2024
1a8dbbc
sst-integration: enable debug trace for sst testing
William-An Sep 3, 2024
3bee152
sst-integration: resourcing gpu app for env vars
William-An Sep 4, 2024
8506a0c
sst-integration: use GPUAPPS_ROOT for path for gpu app
William-An Sep 4, 2024
057fec2
sst-integration: use GPUAPPS_ROOT for path for gpu app
William-An Sep 4, 2024
89ee2fa
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Sep 4, 2024
c156391
sst-integration: enable parallel ci tests and fix not returning with …
William-An Sep 11, 2024
fb17f4c
sst-integration: using debug flag for CI run
William-An Sep 12, 2024
2cb3dc9
sst-integration: revert debug ci run
William-An Sep 12, 2024
39ac8fa
sst-integration: CI skips cuda sdk download and launch multiple jobs
William-An Sep 12, 2024
1bb2596
sst-integration: reenable parallel tests
William-An Sep 12, 2024
65dd9a3
sst-integration: reduce concurrent test thread count
William-An Sep 12, 2024
daeec93
sst-integration: skip long test for github runner
William-An Sep 16, 2024
753e8e2
sst-integration: try running CI with single core
William-An Sep 17, 2024
04e8c09
sst-integrtion: add callback to SST to check thread sync is done in S…
William-An Sep 19, 2024
eefad38
sst-integration: ignore lookup if already found and add callbacks to SST
William-An Sep 25, 2024
ad47efd
Automated Format
purdue-jenkins Sep 25, 2024
1f40b2a
sst-integration: add support for indirect texture access
William-An Sep 26, 2024
5f7aad0
Merge branch 'sst-integration' of github.com:William-An/gpgpu-sim_dis…
William-An Sep 26, 2024
4264dd4
Automated Format
purdue-jenkins Sep 26, 2024
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
80 changes: 80 additions & 0 deletions .github/workflows/sst_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Workflow with cmake build system
name: SST Integration Test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the mydev branch
push:
branches-ignore:
- "gh-readonly-queue**"
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-QV100:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
# test_type: [simple, medium, long]
test_type: [simple, medium]
container:
image: tgrogers/accel-sim_regress:SST-Integration-Ubuntu-22.04-cuda-11.7-llvm-18.1.8-riscv-gnu-2024.08.06-nightly
env:
CONFIG: QV100
GPU_ARCH: sm_70

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Build GPGPU-Sim in SST mode
run: |
source ./setup_environment
make -j4
- name: Prepare SST dependencies
run: |
apt install -y openmpi-bin openmpi-common libtool libtool-bin autoconf python3 python3-dev automake build-essential git
# Use personal repo for now
- name: Build SST-Core
run: |
git clone https://github.com/William-An/sst-core.git
cd sst-core
git pull
git checkout devel
./autogen.sh
./configure --prefix=`realpath ../sstcore-install` --disable-mpi --disable-mem-pools
make -j4
make install
cd ..
rm -rf ./sst-core
# Use personal repo for now
- name: Build SST-Elements
run: |
git clone https://github.com/William-An/sst-elements.git
source ./setup_environment
cd sst-elements
git pull
git checkout balar-mmio-vanadis-llvm
./autogen.sh
./configure --prefix=`realpath ../sstelements-install` --with-sst-core=`realpath ../sstcore-install` --with-cuda=$CUDA_INSTALL_PATH --with-gpgpusim=$GPGPUSIM_ROOT
make -j4
make install
# Have to resource the gpu app
# Also fake a SDK since rodinia 2.0 does not need this, speed things up on github
- name: Balar Test
run: |
pip install testtools blessings pygments
source ./setup_environment
mkdir 4.2
mkdir fake_sdk
export NVIDIA_COMPUTE_SDK_LOCATION=$(readlink -f ./fake_sdk)
source $GPUAPPS_ROOT/src/setup_environment sst
rm -rf 4.2
rm -f gpucomputingsdk_4.2.9_linux.run
./sstcore-install/bin/sst-test-elements -w "*balar*${{ matrix.test_type }}*"
35 changes: 35 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,41 @@ pipeline {
ssh [email protected] "cd $PLOTDIR && rm -rf latest && cp -r ${BUILD_NUMBER} latest"'
}
}
stage('sst-core-build') {
steps {
sh 'rm -rf sstcore-install'
sh 'rm -rf sst-core && git clone [email protected]:sstsimulator/sst-core.git'
sh '''#!/bin/bash
cd sst-core
./autogen.sh
./configure --prefix=`realpath ../sstcore-install` --disable-mpi --disable-mem-pools
make -j 10
make install'''
}
}
stage('sst-elements-build') {
steps {
sh 'rm -rf sstelements-install'
sh 'rm -rf sst-elements && git clone [email protected]:sstsimulator/sst-elements.git'
// First sourcing the env_setup and setup_environment script for env vars
sh '''#!/bin/bash
source ./env-setup/11.0_env_setup.sh
source `pwd`/setup_environment
cd sst-elements
./autogen.sh
./configure --prefix=`realpath ../sstelements-install` --with-sst-core=`realpath ../sstcore-install` --with-cuda=$CUDA_INSTALL_PATH --with-gpgpusim=$GPGPUSIM_ROOT
make -j 10
make install'''
}
}
stage('sst balar test') {
steps {
sh '''#!/bin/bash
source ./env-setup/11.0_env_setup.sh
source `pwd`/setup_environment sst
./sstcore-install/bin/sst-test-elements -p ./sst-elements/src/sst/elements/balar/tests'''
}
}
}
post {
success {
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ INTERSIM ?= intersim2

include version_detection.mk

# Check for debug
ifeq ($(GPGPUSIM_CONFIG), gcc-$(CC_VERSION)/cuda-$(CUDART_VERSION)/debug)
export DEBUG=1
else
Expand Down Expand Up @@ -168,6 +169,7 @@ $(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.10.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.10.0; fi
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.10.1 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.10.1; fi
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.11.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.11.0; fi
if [ ! -f $(SIM_LIB_DIR)/libcudart_mod.so ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart_mod.so; fi

$(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib
g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\
Expand Down
17 changes: 17 additions & 0 deletions libcuda/cuda_api_object.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __cuda_api_object_h__
#define __cuda_api_object_h__

#include <functional>
#include <list>
#include <map>
#include <set>
Expand Down Expand Up @@ -193,9 +194,25 @@ class cuda_runtime_api {
// backward pointer
class gpgpu_context *gpgpu_ctx;
// member function list

// For SST and other potential simulator interface
void cuobjdumpInit(const char *fn);
void extract_code_using_cuobjdump(const char *fn);
void extract_ptx_files_using_cuobjdump(CUctx_st *context, const char *fn);

// For running GPGPUSim alone
void cuobjdumpInit();
void extract_code_using_cuobjdump();
void extract_ptx_files_using_cuobjdump(CUctx_st *context);

// Internal functions for the above public methods
void cuobjdumpInit_internal(std::function<void()> ctx_extract_code_func);
void extract_code_using_cuobjdump_internal(
CUctx_st *context, std::string &app_binary,
std::function<void(CUctx_st *)> ctx_extract_ptx_func);
void extract_ptx_files_using_cuobjdump_internal(CUctx_st *context,
std::string &app_binary);

std::list<cuobjdumpSection *> pruneSectionList(CUctx_st *context);
std::list<cuobjdumpSection *> mergeMatchingSections(std::string identifier);
std::list<cuobjdumpSection *> mergeSections();
Expand Down
Loading