Skip to content

Commit 3f3fa59

Browse files
authored
Merge pull request #33 from gunrock/muhosama/improvements
Build system improvements.
2 parents 95557c6 + 249bcc9 commit 3f3fa59

File tree

8 files changed

+65
-78
lines changed

8 files changed

+65
-78
lines changed

.github/workflows/clang-format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ on:
99
jobs:
1010
formatting-check:
1111
name: Format
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1515
with:
1616
ref: ${{ github.event.pull_request.head.ref }}
1717

.github/workflows/ubuntu-22.04.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ jobs:
2525

2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
28-
# Fetch CUDA toolkit using Jimver/cuda-toolkit@v0.2.7
28+
# Fetch CUDA toolkit using Jimver/cuda-toolkit
2929
- name: Fetch CUDA toolkit
30-
uses: Jimver/cuda-toolkit@v0.2.7
30+
uses: Jimver/cuda-toolkit@v0.2.27
3131
id: cuda-toolkit
3232
with:
33-
cuda: '11.7.0'
33+
cuda: '13.0.0'
3434
linux-local-args: '["--toolkit"]'
3535

3636
# Runs a single command using the runners shell
3737
- name: Check nvcc version
3838
run: nvcc -V
3939

4040
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v5
4242

4343
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4444
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ubuntu-20.04
1+
name: ubuntu-latest
22

33
# Controls when the workflow will run
44
on:
@@ -21,24 +21,24 @@ jobs:
2121
build:
2222
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
2323
if: "!contains(github.event.commits[0].message, '[skip build]')"
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-latest
2525

2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
28-
# Fetch CUDA toolkit using Jimver/cuda-toolkit@v0.2.7
28+
# Fetch CUDA toolkit using Jimver/cuda-toolkit
2929
- name: Fetch CUDA toolkit
30-
uses: Jimver/cuda-toolkit@v0.2.7
30+
uses: Jimver/cuda-toolkit@v0.2.27
3131
id: cuda-toolkit
3232
with:
33-
cuda: '11.7.0'
33+
cuda: '13.0.0'
3434
linux-local-args: '["--toolkit"]'
3535

3636
# Runs a single command using the runners shell
3737
- name: Check nvcc version
3838
run: nvcc -V
3939

4040
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v5
4242

4343
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4444
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type

.github/workflows/windows-2019.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: windows-2022
1+
name: windows-latest
22

33
# Controls when the workflow will run
44
on:
@@ -21,24 +21,24 @@ jobs:
2121
build:
2222
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
2323
if: "!contains(github.event.commits[0].message, '[skip build]')"
24-
runs-on: windows-2022
24+
runs-on: windows-latest
2525

2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
2828
# Fetch CUDA toolkit using Jimver/cuda-toolkit@v0.2.7
2929
- name: Fetch CUDA toolkit
30-
uses: Jimver/cuda-toolkit@v0.2.7
30+
uses: Jimver/cuda-toolkit@v0.2.27
3131
id: cuda-toolkit
3232
with:
33-
cuda: '11.7.0'
33+
cuda: '13.0.0'
3434
linux-local-args: '["--toolkit"]'
3535

3636
# Runs a single command using the runners shell
3737
- name: Check nvcc version
3838
run: nvcc -V
3939

4040
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v5
4242

4343
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4444
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ Prior to the work we present and propose here, the only way to unleash the GPU's
99
With our open-source framework, we hope to not only improve programmers' productivity when developing irregular-parallel algorithms on the GPU but also improve the overall performance characteristics for such applications by allowing a quick path to experimentation with a variety of existing load-balancing techniques. Consequently, we also hope that by separating the concerns of load-balancing from work processing within our abstraction, managing and extending existing code to future architectures becomes easier.
1010

1111
## Requirements
12-
- **OS:** Ubuntu 18.04, 20.04, Windows
13-
- **Hardware:** NVIDIA GPU (Volta or newer)
12+
13+
- **OS:** Ubuntu 24.04, Windows
14+
- **Hardware:** NVIDIA GPU (Turing or newer)
1415
- **Software:** CUDA 11.7 or above and cmake 3.20.1 or above.
1516
- **CUDA Architecture:** SM 70 or above (see [GPUs supported](https://en.wikipedia.org/wiki/CUDA#GPUs_supported)), this is specified using cmake's command: `-DCMAKE_CUDA_ARCHITECTURES=70`. Alternatively, set the CUDA architecture version in the `CMakeLists.txt` file directly: [CMakeLists.txt#72](https://github.com/gunrock/loops/blob/main/CMakeLists.txt#L72).
1617

1718
## Getting Started
19+
1820
Before building `loops` make sure you have CUDA Toolkit and cmake installed on your system, and exported in `PATH` of your system. Other external dependencies such as `NVIDIA/thrust`, `NVIDIA/cub`, etc. are automatically fetched using cmake.
1921

2022
```bash
2123
git clone https://github.com/gunrock/loops.git
2224
cd loops
2325
mkdir build && cd build
24-
cmake -DCMAKE_CUDA_ARCHITECTURES=70 .. # Volta = 70, Turing = 75, ...
26+
cmake -DCMAKE_CUDA_ARCHITECTURES=75 .. # Turing = 75, ...
2527
make -j$(nproc)
2628
bin/loops.spmv.merge_path -m ../datasets/chesapeake/chesapeake.mtx
2729
```
@@ -31,7 +33,9 @@ bin/loops.spmv.merge_path -m ../datasets/chesapeake/chesapeake.mtx
3133
```bash
3234
make loops.spmv.<algorithm>
3335
```
36+
3437
Replaced the `<algorithm>` with one of the following algorithm names to build a specific SpMV algorithm instead of all of them:
38+
3539
- `original`
3640
- `thread_mapped`
3741
- `group_mapped`
@@ -44,6 +48,7 @@ An example of the above: `make loops.spmv.merge_path`.
4448

4549
To download the SuiteSparse Matrix Collection[^1], simply run the following command. We recommend using a `tmux` session, because downloading the entire collection can take a significant time. Uncompress the dataset by running the following command in the dataset's directory `find . -name '*.tar.gz' -execdir tar -xzvf '{}' \;
4650
` The total downloaded size of the dataset is nontrivial: uncompressed + compressed = 887GB.
51+
4752
```bash
4853
wget --recursive --no-parent --force-directories -l inf -X RB,mat \
4954
--accept "*.tar.gz" "https://suitesparse-collection-website.herokuapp.com/"
@@ -59,15 +64,20 @@ wget --recursive --no-parent --force-directories -l inf -X RB,mat \
5964
[^1]: Timothy A. Davis and Yifan Hu. 2011. The University of Florida Sparse Matrix Collection. ACM Transactions on Mathematical Software 38, 1, Article 1 (December 2011), 25 pages. DOI: https://doi.org/10.1145/2049662.2049663
6065

6166
## Experimentation
67+
6268
If CUDA and cmake are already setup, follow the [Getting Started](#getting-started) instructions. Or, you may prefer to set up the entire project using docker, and for that we have provided a docker file and instructions on how to use it in [/docker](https://github.com/gunrock/loops/tree/main/docker) directory.
6369

6470
### Sanity Check
71+
6572
Run the following command in the cmake's `build` folder:
73+
6674
```bash
6775
bin/loops.spmv.merge_path -m ../datasets/chesapeake/chesapeake.mtx \
6876
--validate -v
6977
```
78+
7079
You should approximately see the following output:
80+
7181
```bash
7282
~/loops/build$ bin/loops.spmv.merge_path \
7383
-m ../datasets/chesapeake/chesapeake.mtx --validate -v
@@ -76,7 +86,9 @@ Matrix: chesapeake.mtx
7686
Dimensions: 39 x 39 (340)
7787
Errors: 0
7888
```
89+
7990
## Reproducing Results
91+
8092
> Find pre-generated results in [plots/](https://github.com/gunrock/loops/blob/main/plots/) directory along with `performance_evaluation.ipynb` notebook to recreate the plots (labeled figures) found in the paper.
8193
8294
1. In the run script, update the `DATASET_DIR` to point to the path of all the downloaded datasets (set to the path of the directory containing `MM` directory, and inside the `MM` it has subdirectories with `.mtx` files): [scripts/run.sh](https://github.com/gunrock/loops/blob/main/scripts/run.sh). Additionally, you may change the path to `DATASET_FILES_NAME` containing the list of all the datasets (default points to [datasets/suitesparse.txt](https://github.com/gunrock/loops/blob/main/datasets/suitesparse.txt)).

docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
services:
2+
loops-dev:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
image: loops-dev:latest
7+
container_name: loops-dev
8+
network_mode: "host"
9+
devices:
10+
- /dev/dri
11+
group_add:
12+
- video
13+
cap_add:
14+
- SYS_PTRACE
15+
security_opt:
16+
- seccomp=unconfined
17+
shm_size: "16g"
18+
ulimits:
19+
memlock:
20+
soft: -1
21+
hard: -1
22+
stack:
23+
soft: 67108864
24+
hard: 67108864
25+
volumes:
26+
- ${HOME}:${HOME}
27+
- ./:/workspace
28+
environment:
29+
- GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no
30+
working_dir: /workspace
31+
tty: true
32+
stdin_open: true
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Or directly get from docker:
2-
# docker pull neoblizz/loops:v0.1
3-
FROM nvidia/cuda:11.7.0-devel-ubuntu20.04
1+
FROM nvidia/cuda:13.0.0-devel-ubuntu22.04
42

53
# Install dependencies
64
RUN apt-get update

0 commit comments

Comments
 (0)