Skip to content

Commit da34069

Browse files
Merge pull request #642 from lattice/feature/twist-clover-cleanup
Feature/twist clover cleanup
2 parents 7a10826 + 0dd4f75 commit da34069

File tree

114 files changed

+5140
-7677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+5140
-7677
lines changed

CMakeLists.txt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ if(NOT QUDA_GPU_ARCH)
6767
message ("-- Building QUDA for arch " "${QUDA_DEFAULT_GPU_ARCH}")
6868
endif()
6969

70-
set(QUDA_GPU_ARCH ${QUDA_DEFAULT_GPU_ARCH} CACHE STRING "set the GPU architecture (sm_20, sm_21, sm_30, sm_35, sm_37, sm_50, sm_52, sm_60)")
71-
set_property(CACHE QUDA_GPU_ARCH PROPERTY STRINGS sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60)
70+
set(QUDA_GPU_ARCH ${QUDA_DEFAULT_GPU_ARCH} CACHE STRING "set the GPU architecture (sm_20, sm_21, sm_30, sm_35, sm_37, sm_50, sm_52, sm_60, sm_70)")
71+
set_property(CACHE QUDA_GPU_ARCH PROPERTY STRINGS sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_70)
7272
# build options
7373
set(QUDA_DIRAC_WILSON ON CACHE BOOL "build Wilson Dirac operators")
7474
set(QUDA_DIRAC_CLOVER ON CACHE BOOL "build clover Dirac operators")
@@ -137,9 +137,6 @@ set(QUDA_MAX_MULTI_BLAS_N "4" CACHE STRING "maximum value to intizlize template
137137
set(QUDA_MPI_NVTX OFF CACHE BOOL "add nvtx markup to MPI API calls for the visual profiler")
138138
set(QUDA_INTERFACE_NVTX OFF CACHE BOOL "add nvtx markup to interface calls for the visual profiler")
139139

140-
# GPUdirect options
141-
set(QUDA_GPU_DIRECT ON CACHE BOOL "set to 'yes' to allow GPU and NIC to shared pinned buffers")
142-
143140
# features in development
144141
set(QUDA_SSTEP OFF CACHE BOOL "build s-step linear solvers")
145142
set(QUDA_MULTIGRID OFF CACHE BOOL "build multigrid solvers")
@@ -160,8 +157,6 @@ mark_as_advanced(QUDA_MAX_MULTI_BLAS_N)
160157
mark_as_advanced(QUDA_MPI_NVTX)
161158
mark_as_advanced(QUDA_INTERFACE_NVTX)
162159

163-
mark_as_advanced(QUDA_GPU_DIRECT)
164-
165160
mark_as_advanced(QUDA_SSTEP)
166161
mark_as_advanced(QUDA_USE_EIGEN)
167162
mark_as_advanced(QUDA_BLOCKSOVER)
@@ -457,10 +452,6 @@ if(NOT QUDA_FERMI_DBLE_TEX)
457452
add_definitions(-DFERMI_NO_DBLE_TEX)
458453
endif(NOT QUDA_FERMI_DBLE_TEX)
459454

460-
if(GPU_DIRECT)
461-
add_definitions(-DGPU_DIRECT)
462-
endif(GPU_DIRECT)
463-
464455
if(QUDA_INTERFACE_QDP)
465456
add_definitions(-DBUILD_QDP_INTERFACE)
466457
endif(QUDA_INTERFACE_QDP)

configure

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,6 @@ BUILD_MILC_INTERFACE
609609
BUILD_QDP_INTERFACE
610610
INTERFACE_NVTX
611611
MPI_NVTX
612-
GPU_DIRECT
613612
POSIX_THREADS
614613
BUILD_MPI
615614
BUILD_QMP
@@ -730,7 +729,6 @@ enable_sstep
730729
enable_contract
731730
enable_dynamic_clover
732731
enable_multi_gpu
733-
enable_gpu_direct
734732
enable_mpi_nvtx
735733
enable_interface_nvtx
736734
with_mpi
@@ -1370,7 +1368,7 @@ Optional Features:
13701368
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
13711369
--enable-cpu-arch=arch Set CPU arch: x86 or x86_64 (default: x86_64)
13721370
--enable-gpu-arch=arch Set GPU arch: sm_20, sm_21, sm_30, sm_35, sm_50,
1373-
sm_52, sm_60 (default: sm_35)
1371+
sm_52, sm_60, sm_70 (default: sm_35)
13741372
--enable-os=os Set operating system: linux, osx (default: linux)
13751373
--enable-host-debug Enable debugging of host code
13761374
--enable-device-debug Enable debugging for device code
@@ -1418,8 +1416,6 @@ Optional Features:
14181416
--enable-dynamic-clover Invert dynamically the clover term for
14191417
twisted-clover fermions (default: disabled)
14201418
--enable-multi-gpu Enable Multi-GPU support (default: disabled)
1421-
--enable-gpu-direct Enable CUDA/NIC interop pinned memory (default:
1422-
enabled)
14231419
--enable-mpi-nvtx Enable NVTX markup for profiling MPI API calls in
14241420
the visual profiler (default: disabled)
14251421
--enable-interface-nvtx Enable NVTX markup for profiling interface calls in
@@ -2312,15 +2308,6 @@ else
23122308
fi
23132309
23142310
2315-
# Check whether --enable-gpu-direct was given.
2316-
if test "${enable_gpu_direct+set}" = set; then :
2317-
enableval=$enable_gpu_direct; gpu_direct=${enableval}
2318-
else
2319-
gpu_direct="yes"
2320-
2321-
fi
2322-
2323-
23242311
# Check whether --enable-mpi-nvtx was given.
23252312
if test "${enable_mpi_nvtx+set}" = set; then :
23262313
enableval=$enable_mpi_nvtx; mpi_nvtx=${enableval}
@@ -4044,9 +4031,9 @@ x86 | x86_64 ) ;;
40444031
esac
40454032
40464033
case ${gpu_arch} in
4047-
sm_20 | sm_21 | sm_30 | sm_35 | sm_50 | sm_52 | sm_60) ;;
4034+
sm_20 | sm_21 | sm_30 | sm_35 | sm_50 | sm_52 | sm_60 | sm_70) ;;
40484035
*)
4049-
as_fn_error $? " GPU arch must be one of: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60 " "$LINENO" 5
4036+
as_fn_error $? " GPU arch must be one of: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60, sm_70 " "$LINENO" 5
40504037
;;
40514038
esac
40524039
@@ -4253,13 +4240,6 @@ yes|no);;
42534240
;;
42544241
esac
42554242
4256-
case ${gpu_direct} in
4257-
yes|no);;
4258-
*)
4259-
as_fn_error $? " invalid value for --enable-gpu-direct " "$LINENO" 5
4260-
;;
4261-
esac
4262-
42634243
case ${mpi_nvtx} in
42644244
yes|no);;
42654245
*)
@@ -4493,11 +4473,6 @@ $as_echo "$as_me: Setting POSIX_THREADS = ${posix_threads}" >&6;}
44934473
POSIX_THREADS=${posix_threads}
44944474
44954475
4496-
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting GPU_DIRECT= ${gpu_direct}" >&5
4497-
$as_echo "$as_me: Setting GPU_DIRECT= ${gpu_direct}" >&6;}
4498-
GPU_DIRECT=${gpu_direct}
4499-
4500-
45014476
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting MPI_NVTXS= ${mpi_nvtx}" >&5
45024477
$as_echo "$as_me: Setting MPI_NVTXS= ${mpi_nvtx}" >&6;}
45034478
MPI_NVTX=${mpi_nvtx}

configure.ac

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ AC_ARG_ENABLE(cpu-arch,
1818

1919
dnl Specify GPU Arch
2020
AC_ARG_ENABLE(gpu-arch,
21-
AC_HELP_STRING([--enable-gpu-arch=arch], [ Set GPU arch: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60 (default: sm_35)]),
21+
AC_HELP_STRING([--enable-gpu-arch=arch], [ Set GPU arch: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60, sm_70 (default: sm_35)]),
2222
[ gpu_arch=${enableval} ],
2323
[ gpu_arch="sm_35" ]
2424
)
@@ -207,13 +207,6 @@ AC_ARG_ENABLE(multi-gpu,
207207
[ multi_gpu="no" ]
208208
)
209209

210-
dnl enable cuda / nic interop buffer
211-
AC_ARG_ENABLE(gpu-direct,
212-
AC_HELP_STRING([--enable-gpu-direct], [ Enable CUDA/NIC interop pinned memory (default: enabled)]),
213-
[ gpu_direct=${enableval}],
214-
[ gpu_direct="yes" ]
215-
)
216-
217210
dnl enable NVTX mark up for the MPI in the visual profiler
218211
AC_ARG_ENABLE(mpi-nvtx,
219212
AC_HELP_STRING([--enable-mpi-nvtx], [ Enable NVTX markup for profiling MPI API calls in the visual profiler (default: disabled)]),
@@ -351,9 +344,9 @@ esac
351344

352345
dnl CPU Arch
353346
case ${gpu_arch} in
354-
sm_20 | sm_21 | sm_30 | sm_35 | sm_50 | sm_52 | sm_60) ;;
347+
sm_20 | sm_21 | sm_30 | sm_35 | sm_50 | sm_52 | sm_60 | sm_70) ;;
355348
*)
356-
AC_MSG_ERROR([ GPU arch must be one of: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60 ])
349+
AC_MSG_ERROR([ GPU arch must be one of: sm_20, sm_21, sm_30, sm_35, sm_50, sm_52, sm_60, sm_70 ])
357350
;;
358351
esac
359352

@@ -589,14 +582,6 @@ yes|no);;
589582
;;
590583
esac
591584

592-
dnl Enables CUDA/NIC buffer interop
593-
case ${gpu_direct} in
594-
yes|no);;
595-
*)
596-
AC_MSG_ERROR([ invalid value for --enable-gpu-direct ])
597-
;;
598-
esac
599-
600585
dnl enable NVTX mark up for the MPI in the visual profiler
601586
case ${mpi_nvtx} in
602587
yes|no);;
@@ -780,9 +765,6 @@ AC_SUBST( BUILD_MPI, [${build_mpi}])
780765
AC_MSG_NOTICE([Setting POSIX_THREADS = ${posix_threads}])
781766
AC_SUBST( POSIX_THREADS, [${posix_threads}])
782767

783-
AC_MSG_NOTICE([Setting GPU_DIRECT= ${gpu_direct}])
784-
AC_SUBST( GPU_DIRECT, [${gpu_direct}])
785-
786768
AC_MSG_NOTICE([Setting MPI_NVTXS= ${mpi_nvtx}])
787769
AC_SUBST( MPI_NVTX, [${mpi_nvtx}])
788770

include/clover_field.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ namespace quda {
102102
void compute(const cudaGaugeField &gauge);
103103

104104
#ifdef USE_TEXTURE_OBJECTS
105+
cudaTextureObject_t tex;
106+
cudaTextureObject_t normTex;
107+
cudaTextureObject_t invTex;
108+
cudaTextureObject_t invNormTex;
105109
cudaTextureObject_t evenTex;
106110
cudaTextureObject_t evenNormTex;
107111
cudaTextureObject_t oddTex;
@@ -110,7 +114,7 @@ namespace quda {
110114
cudaTextureObject_t evenInvNormTex;
111115
cudaTextureObject_t oddInvTex;
112116
cudaTextureObject_t oddInvNormTex;
113-
void createTexObject(cudaTextureObject_t &tex, cudaTextureObject_t &texNorm, void *field, void *norm);
117+
void createTexObject(cudaTextureObject_t &tex, cudaTextureObject_t &texNorm, void *field, void *norm, bool full);
114118
void destroyTexObject();
115119
#endif
116120

@@ -121,6 +125,10 @@ namespace quda {
121125
virtual ~cudaCloverField();
122126

123127
#ifdef USE_TEXTURE_OBJECTS
128+
const cudaTextureObject_t& Tex() const { return tex; }
129+
const cudaTextureObject_t& NormTex() const { return normTex; }
130+
const cudaTextureObject_t& InvTex() const { return invTex; }
131+
const cudaTextureObject_t& InvNormTex() const { return invNormTex; }
124132
const cudaTextureObject_t& EvenTex() const { return evenTex; }
125133
const cudaTextureObject_t& EvenNormTex() const { return evenNormTex; }
126134
const cudaTextureObject_t& OddTex() const { return oddTex; }

0 commit comments

Comments
 (0)