From bc8061fd1e3c26be37e2cbb83ff9ca26e6f4dead Mon Sep 17 00:00:00 2001 From: WilliamMTK Date: Thu, 4 Apr 2024 18:13:54 -0400 Subject: Migrate gpgpu-sim build system to cmake (#66) * migrate_cmake: add package dependency checking * migrate_cmake: port setup_environment to CMake * migrate_cmake: break dependency checking and env export gen to different .cmake files * migrate_cmake: use CUDAToolkit_FOUND to test for CUDA compiler * migrate_cmake: use CUDAToolkit_FOUND to test for CUDA compiler * migrate_cmake: use CUDAToolkit_FOUND to test for CUDA compiler * migrate_cmake: properly parse for cuda version number * migrate_cmake: set highest CUDA supported to be 11.10.x * migrate_cmake: specify top level CMake file * migrate_cmake: add libcuda cmake file * migrate_cmake: use global compiler options and definitions * migrate_cmake: add cmake file to src * migrate_cmake: add cmake files for cuda-sim folder * migrate_cmake: add cmake files to gpgpu-sim folder * migrate_cmake: add cmake files for intersim * migrate_cmake: add short test using cmake * migrate_cmake: bump CXX standard requirement to 17 * Add cmake files for accelwattch * migrate_cmake: remove use of GLOB to grab source files * migrate_cmake: comment out the write protection on generated instructions.h * migrate_cmake: create sym folder and add newline to generated setup file * migrate_cmake: fix some path issues * migrate_cmake: let cmake thinks flex and bison generate CXX files * migrate_cmake: fix not linking pthread properly * migrate_cmake: remove debug message * migrate_cmake: add empty libopencl cmake file * migrate_cmake: install phase and runtime version detect * Added install phase to install the shared object and add symlinks * Changes with CUDA toolkit will be detected and triggered a rebuild * GPGPU-Sim detailed version string will be updated on each build * Typo fix and fix correct bin dir * Replace gcc -> g++ in intersim * ignore setup * check CMAKE_BUILD_TYPE * set DCMAKE_BUILD_TYPE --------- Co-authored-by: JRPAN <25518778+JRPan@users.noreply.github.com> --- short-tests-cmake.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 short-tests-cmake.sh (limited to 'short-tests-cmake.sh') diff --git a/short-tests-cmake.sh b/short-tests-cmake.sh new file mode 100755 index 0000000..e414441 --- /dev/null +++ b/short-tests-cmake.sh @@ -0,0 +1,27 @@ +if [ ! -n "$CUDA_INSTALL_PATH" ]; then + echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; + exit; +fi + +if [ ! -n "$CONFIG" ]; then + echo "ERROR ** set the CONFIG env variable to one of those found in ./accel-sim-framework/util/job_launching/configs/define-standard-cfgs.yml"; + exit; +fi + +if [ ! -n "$GPUAPPS_ROOT" ]; then + echo "ERROR ** GPUAPPS_ROOT to a location where the apps have been compiled"; + exit; +fi + +git config --system --add safe.directory '*' + +export PATH=$CUDA_INSTALL_PATH/bin:$PATH + +cmake -B build +cmake --build build -j +cmake --install build +source setup + +git clone https://github.com/accel-sim/accel-sim-framework.git +./accel-sim-framework/util/job_launching/run_simulations.py -C $CONFIG -B rodinia_2.0-ft -N regress -l local +./accel-sim-framework/util/job_launching/monitor_func_test.py -v -N regress -j procman -- cgit v1.3 From 48af0c94ca6d7b05f800f535b3de4cefafcfa655 Mon Sep 17 00:00:00 2001 From: WilliamMTK Date: Wed, 29 Jan 2025 15:40:45 -0500 Subject: Add accelsim test (#82) * add_accelsim_test: add action and test script * add_accelsim_test: add error status to exit command --- .github/workflows/accelsim.yml | 33 +++++++++++++++++++++++++++++++++ short-tests-accelsim.sh | 39 +++++++++++++++++++++++++++++++++++++++ short-tests-cmake.sh | 6 +++--- short-tests.sh | 6 +++--- 4 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/accelsim.yml create mode 100755 short-tests-accelsim.sh (limited to 'short-tests-cmake.sh') diff --git a/.github/workflows/accelsim.yml b/.github/workflows/accelsim.yml new file mode 100644 index 0000000..7410352 --- /dev/null +++ b/.github/workflows/accelsim.yml @@ -0,0 +1,33 @@ +# Test backend changes with Accel-Sim + +name: Short-Tests-AccelSim + +# Controls when the workflow will run +on: + push: + branches-ignore: + - "gh-readonly-queue**" + merge_group: + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# By default regress against accel-sim's dev branch +env: + ACCELSIM_BRANCH: dev + +# 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 + container: + image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 + + # 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: Run Simulation + run: /bin/bash $GITHUB_WORKSPACE/short-tests-accelsim.sh + diff --git a/short-tests-accelsim.sh b/short-tests-accelsim.sh new file mode 100755 index 0000000..5cb4d2c --- /dev/null +++ b/short-tests-accelsim.sh @@ -0,0 +1,39 @@ +if [ ! -n "$CUDA_INSTALL_PATH" ]; then + echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; + exit 1; +fi + +if [ ! -n "$ACCELSIM_BRANCH" ]; then + echo "ERROR ** set the ACCELSIM_BRANCH env variable"; + exit 1; +fi + +if [ ! -n "$GPUAPPS_ROOT" ]; then + echo "ERROR ** GPUAPPS_ROOT to a location where the apps have been compiled"; + exit 1; +fi + +git config --system --add safe.directory '*' + +export PATH=$CUDA_INSTALL_PATH/bin:$PATH +source ./setup_environment +make -j + +git clone https://github.com/accel-sim/accel-sim-framework.git + +# Build accel-sim +cd accel-sim-framework +git checkout $ACCELSIM_BRANCH +source ./gpu-simulator/setup_environment.sh +make -j -C ./gpu-simulator + +# Get rodinia traces +rm -rf ./hw_run/rodinia_2.0-ft +wget https://engineering.purdue.edu/tgrogers/accel-sim/traces/tesla-v100/latest/rodinia_2.0-ft.tgz +mkdir -p ./hw_run +tar -xzvf rodinia_2.0-ft.tgz -C ./hw_run +rm rodinia_2.0-ft.tgz + +# Run rodinia traces +./util/job_launching/run_simulations.py -C QV100-SASS -B rodinia_2.0-ft -T ./hw_run/rodinia_2.0-ft/9.1 -N myTest +./util/job_launching/monitor_func_test.py -v -N myTest diff --git a/short-tests-cmake.sh b/short-tests-cmake.sh index e414441..23cf66c 100755 --- a/short-tests-cmake.sh +++ b/short-tests-cmake.sh @@ -1,16 +1,16 @@ if [ ! -n "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; - exit; + exit 1; fi if [ ! -n "$CONFIG" ]; then echo "ERROR ** set the CONFIG env variable to one of those found in ./accel-sim-framework/util/job_launching/configs/define-standard-cfgs.yml"; - exit; + exit 1; fi if [ ! -n "$GPUAPPS_ROOT" ]; then echo "ERROR ** GPUAPPS_ROOT to a location where the apps have been compiled"; - exit; + exit 1; fi git config --system --add safe.directory '*' diff --git a/short-tests.sh b/short-tests.sh index 44f265a..a1db762 100755 --- a/short-tests.sh +++ b/short-tests.sh @@ -1,16 +1,16 @@ if [ ! -n "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; - exit; + exit 1; fi if [ ! -n "$CONFIG" ]; then echo "ERROR ** set the CONFIG env variable to one of those found in ./accel-sim-framework/util/job_launching/configs/define-standard-cfgs.yml"; - exit; + exit 1; fi if [ ! -n "$GPUAPPS_ROOT" ]; then echo "ERROR ** GPUAPPS_ROOT to a location where the apps have been compiled"; - exit; + exit 1; fi git config --system --add safe.directory '*' -- cgit v1.3