Skip to content

Commit 9009f81

Browse files
authored
Merge pull request #45 from roussian23/addcuda
add cuda benchmark
2 parents 511b5d6 + ed97d12 commit 9009f81

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

benchmark/marmousi_2D.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ def get_args(args=sys.argv[1:]):
4949
cflags = '-O3 -fPIC -ffast-math -fopenmp \
5050
-fopenmp-targets=nvptx64-nvidia-cuda \
5151
-Xopenmp-target -march=sm_75'
52+
elif language == 'cuda':
53+
cc = 'nvcc'
54+
cflags = '-O3 -gencode arch=compute_75,code=sm_75 \
55+
--compiler-options -fPIC,-Wall \
56+
--use_fast_math -std=c++17 -shared \
57+
-DDEBUG -DTX=32 -DTY=4 -DTZ=2'
5258
else:
5359
raise ValueError('Language not available')
5460

benchmark/overthrust_3D.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ def read_model(filename):
5656
cflags = '-O3 -fPIC -ffast-math -fopenmp \
5757
-fopenmp-targets=nvptx64-nvidia-cuda \
5858
-Xopenmp-target -march=sm_75'
59+
elif language == 'cuda':
60+
cc = 'nvcc'
61+
cflags = '-O3 -gencode arch=compute_75,code=sm_75 \
62+
--compiler-options -fPIC,-Wall \
63+
--use_fast_math -std=c++17 -shared \
64+
-DDEBUG -DTX=32 -DTY=4 -DTZ=2'
5965
else:
6066
raise ValueError('Language not available')
6167

0 commit comments

Comments
 (0)