Skip to content
Snippets Groups Projects
Commit f47258be authored by Abhishek Yenpure's avatar Abhishek Yenpure
Browse files

Fixing Kokkos relocatable device code error with desul atomics

parent 9f87ad20
No related merge requests found
......@@ -43,22 +43,25 @@ vtkm_add_target_information(${vtkm_accel_target}
DEVICE_SOURCES ${sources})
list(TRANSFORM nowrap_classes APPEND ".cxx" OUTPUT_VARIABLE device_sources)
if (TARGET vtkm::cuda OR TARGET vtkm::kokkos_cuda)
if (TARGET vtkm::cuda)
# Temporarily suppress "has address taken but no possible call to it" warnings,
# until we figure out its implications.
# We are disabling all warnings as nvlink has no known way to suppress
# individual warning types.
string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w")
set_source_files_properties(${device_sources} PROPERTIES LANGUAGE CUDA)
vtk_module_set_properties(VTK::AcceleratorsVTKmCore CUDA_SEPARABLE_COMPILATION ON)
elseif (TARGET vtkm::kokkos_cuda)
string(APPEND CMAKE_CUDA_FLAGS " -Xnvlink -w")
set_source_files_properties(${device_sources} PROPERTIES LANGUAGE CUDA)
kokkos_compilation(SOURCE ${device_sources})
elseif (TARGET vtkm::kokkos_hip)
set_source_files_properties(${device_sources} PROPERTIES LANGUAGE HIP)
kokkos_compilation(SOURCE ${device_sources})
endif ()
if (MSVC)
set(msvc_warning_flags
# Generates numerous false positives with template code about unreachable
......
......@@ -59,8 +59,10 @@ if (TARGET vtkm::cuda OR TARGET vtkm::kokkos_cuda)
set(cuda_impl ${nowrap_sources} vtkmDataSet.cxx)
set_source_files_properties(${cuda_impl} PROPERTIES LANGUAGE CUDA)
vtk_module_set_properties(VTK::AcceleratorsVTKmDataModel
CUDA_SEPARABLE_COMPILATION ON)
if (TARGET vtkm::cuda)
vtk_module_set_properties(VTK::AcceleratorsVTKmDataModel
CUDA_SEPARABLE_COMPILATION ON)
endif()
vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel
PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
......
......@@ -116,8 +116,10 @@ if (TARGET vtkm::cuda OR TARGET vtkm::kokkos_cuda)
list(TRANSFORM classes APPEND ".cxx" OUTPUT_VARIABLE cuda_impl)
set_source_files_properties(${cuda_impl} PROPERTIES LANGUAGE CUDA)
vtk_module_set_properties(VTK::AcceleratorsVTKmFilters
CUDA_SEPARABLE_COMPILATION ON)
if (TARGET vtkm::cuda)
vtk_module_set_properties(VTK::AcceleratorsVTKmFilters
CUDA_SEPARABLE_COMPILATION ON)
endif()
vtk_module_compile_options(VTK::AcceleratorsVTKmFilters
PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment