-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This code has been ported from https://github.com/UoB-HPC/bude-benchmark, the gpu branch. The code works, but performance is low. Contributes to #3
- Loading branch information
Showing
6 changed files
with
573 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
SHELL := bash | ||
.SHELLFLAGS := -eu -o pipefail -c | ||
.DELETE_ON_ERROR: | ||
|
||
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules | ||
|
||
# ------- | ||
|
||
CC = cc | ||
|
||
ARCH = sm_70 | ||
|
||
CFLAGS = -O3 -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target -march=$(ARCH) | ||
LDFLAGS = -lm | ||
|
||
OBJ = $(patsubst %.c,%.o,$(wildcard *.c)) | ||
|
||
bude: Makefile $(OBJ) | ||
$(CC) $(CFLAGS) $(OBJ) -o bude $(LDFLAGS) | ||
|
||
%.o: %.c Makefile make.deps | ||
$(CC) $(CFLAGS) -c $< | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -f bude *.ptx *.cub *.lst *.o *.optrpt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# BUDE OpenMP Target | ||
|
||
This is a GPU implementation of BUDE using OpenMP target. | ||
|
||
## Building | ||
|
||
This implementations supports the following compilers: | ||
|
||
* CCE (Cray) | ||
* LLVM 10+ (built with offloading support) | ||
|
||
``` | ||
make | ||
``` | ||
|
||
The default compiler and flags can be overridden using `CC` and `CFLAGS`, respectively. | ||
|
||
### Target Architecture | ||
|
||
By default, the NVIDIA V100 is targetted, but this can be changed by setting the `ARCH` parameter to the name of the target GPU architecture. | ||
|
||
For example, to target a P100: | ||
|
||
``` | ||
make ARCH=sm_60 | ||
``` | ||
|
||
## Running | ||
|
||
This implementation has no special run-time options. | ||
The `-n` and `-i` parameters are available. | ||
Run `bude -h` for a help message. |
Oops, something went wrong.