Add volta to the list of support CUDA devices to compile for.

This commit is contained in:
Robert Maynard 2017-08-10 09:41:12 -04:00
parent 89b2700298
commit 76d10e1835
2 changed files with 8 additions and 3 deletions

@ -336,7 +336,9 @@ macro(vtkm_configure_component_CUDA)
# 5 - pascal
# - Uses: --generate-code=arch=compute_60,code=compute_60
# - Uses: --generate-code=arch=compute_61,code=compute_61
# 6 - all
# 6 - volta
# - Uses: --generate-code=arch=compute_70,code=compute_70
# 7 - all
# - Uses: --generate-code=arch=compute_20,code=compute_20
# - Uses: --generate-code=arch=compute_30,code=compute_30
# - Uses: --generate-code=arch=compute_35,code=compute_35
@ -344,11 +346,12 @@ macro(vtkm_configure_component_CUDA)
# - Uses: --generate-code=arch=compute_52,code=compute_52
# - Uses: --generate-code=arch=compute_60,code=compute_60
# - Uses: --generate-code=arch=compute_61,code=compute_61
# - Uses: --generate-code=arch=compute_70,code=compute_70
#
#specify the property
set(VTKm_CUDA_Architecture "native" CACHE STRING "Which GPU Architecture(s) to compile for")
set_property(CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal all)
set_property(CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta all)
#detect what the propery is set too
if(VTKm_CUDA_Architecture STREQUAL "native")
@ -403,6 +406,8 @@ macro(vtkm_configure_component_CUDA)
elseif(VTKm_CUDA_Architecture STREQUAL "pascal")
list(APPEND CUDA_NVCC_FLAGS "--generate-code=arch=compute_60,code=compute_60")
list(APPEND CUDA_NVCC_FLAGS "--generate-code=arch=compute_61,code=compute_61")
elseif(VTKm_CUDA_Architecture STREQUAL "volta")
list(APPEND CUDA_NVCC_FLAGS "--generate-code=arch=compute_70,code=compute_70")
elseif(VTKm_CUDA_Architecture STREQUAL "all")
list(APPEND CUDA_NVCC_FLAGS "--generate-code=arch=compute_20,code=compute_20")
list(APPEND CUDA_NVCC_FLAGS "--generate-code=arch=compute_30,code=compute_30")

@ -165,7 +165,7 @@ relevant options
| VTKm_ENABLE_EXAMPLES | Disabled by default. Turn on building of simple examples of using VTK-m. |
| VTKm_ENABLE_BENCHMARKS | Disabled by default. Turn on additional timing tests. |
| VTKm_ENABLE_CUDA | Disabled by default. Enable CUDA backend. |
| VTKm_CUDA_Architecture | Defaults to native. Specify what GPU architecture(s) to build CUDA code for, options include native, fermi, kepler, maxwell, and pascal. |
| VTKm_CUDA_Architecture | Defaults to native. Specify what GPU architecture(s) to build CUDA code for, options include native, fermi, kepler, maxwell, pascal, and volta. |
| VTKm_ENABLE_TBB | Disabled by default. Enable Intel Threading Building Blocks backend. |
| VTKm_ENABLE_TESTING | Enabled by default. Turn on header, unit, worklet, and filter tests. |
| VTKm_ENABLE_RENDERING | Enabled by default. Turn on the rendering module. |