-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vtkConduitSource: Support mesh data from external memory spaces
Includes the following MRs squashed for easy of rebasing: commit 695023a3b300ae42fc4ce1fff6042cc7d771969c Author: Dan Lipsa <[email protected]> Date: Thu Oct 31 13:56:35 2024 -0400 No need for memorySpace parameter commit cbd3489deab1cd280ea62bef6b36054487db88cf Author: Dan Lipsa <[email protected]> Date: Thu Oct 31 13:12:53 2024 -0400 Use IsDevicePointer instead of IsDirectAccessPossible commit 6e749affe252d5dc05ec5aa00d8f1717a974835f Author: Dan Lipsa <[email protected]> Date: Thu Oct 24 20:29:18 2024 -0400 Add error logging commit 144af51fc79f82ec832b11e740065c2464452af8 Author: Dan Lipsa <[email protected]> Date: Thu Oct 24 16:18:51 2024 -0400 Use cudaPointerGetAttributes to ask if device or host pointer commit 9a46db52454719f6ddb4f0595d5ca03e4efdd259 Author: Dan Lipsa <[email protected]> Date: Fri Sep 27 09:47:55 2024 -0400 No conversion for vtkmDataArray commit b52093c55353e60ba90b3dbe671362fb850b1647 Author: Dan Lipsa <[email protected]> Date: Thu Sep 26 10:37:21 2024 -0400 vtkErrorMacro is not available in a static method commit c318c5bf89de83ced7294b6f79dd02aecadffce7 Author: Dan Lipsa <[email protected]> Date: Thu Sep 5 11:26:15 2024 -0400 Add vtkConduitArrayUtilities to classes of IOCatalystConduit commit f84ef340f5a40127f6006e38102ae0dd4b47cd44 Author: Dan Lipsa <[email protected]> Date: Thu Sep 5 09:24:36 2024 -0400 Remove not needed link with catalyst commit 908563b1ebda7cc47e22d6a4bf92cf5d14a309aa Author: Jaswant Panchumarti <[email protected]> Date: Tue Dec 19 17:45:09 2023 -0500 vtkConduitSource: Support mesh data from external memory spaces
- Loading branch information
Showing
12 changed files
with
1,745 additions
and
70 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
Documentation/release/dev/add-external-memory-support-for-catalyst-conduit.md
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,8 @@ | ||
## Add external memory support for vtkConduitSource | ||
|
||
`vtkConduitSource` can now keep point coordinates, cell connectivity | ||
and field values from conduit on an accelerator device such as CUDA or | ||
HIP. This is done by testing pointers in conduit to see if they are | ||
stored on a device or on the host memory. Note that you must | ||
configure and build VTK with VTK-m configured for the appropriate | ||
device, otherwise data will be transfered to the host memory. |
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 |
---|---|---|
@@ -1,11 +1,47 @@ | ||
set(classes | ||
vtkConduitArrayUtilities | ||
vtkConduitSource | ||
vtkConduitToDataObject | ||
vtkDataObjectToConduit) | ||
|
||
if (TARGET vtkm::cuda) | ||
list(APPEND classes vtkConduitArrayUtilities) | ||
endif() | ||
|
||
vtk_module_add_module(VTK::IOCatalystConduit | ||
CLASSES ${classes}) | ||
CLASSES ${classes} | ||
NOWRAP_CLASSES ${nowrap_classes}) | ||
|
||
if (VTK_KOKKOS_BACKEND STREQUAL "HIP") | ||
set(VTK_KOKKOS_BACKEND_HIP 1) | ||
endif() | ||
|
||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/vtkDeviceMemoryType.h.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/vtkDeviceMemoryType.h" | ||
@ONLY) | ||
|
||
|
||
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") | ||
|
||
list(TRANSFORM nowrap_classes APPEND ".cxx" OUTPUT_VARIABLE nowrap_sources) | ||
set(cuda_impl ${nowrap_sources}) | ||
set_source_files_properties(${cuda_impl} PROPERTIES LANGUAGE CUDA) | ||
|
||
vtk_module_set_properties(VTK::IOCatalystConduit | ||
CUDA_SEPARABLE_COMPILATION ON) | ||
|
||
vtk_module_compile_options(VTK::IOCatalystConduit | ||
PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>) | ||
|
||
find_package(CUDAToolkit REQUIRED) | ||
vtk_module_link(VTK::IOCatalystConduit PRIVATE CUDA::cudart) | ||
endif () | ||
|
||
|
||
vtk_add_test_mangling(VTK::IOCatalystConduit) | ||
add_subdirectory(Catalyst) |
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 |
---|---|---|
@@ -1,15 +1,49 @@ | ||
vtk_add_test_cxx(vtkConduitCxxTests tests | ||
NO_VALID NO_OUTPUT | ||
TestDataObjectToConduit.cxx | ||
TestConduitSource.cxx) | ||
TestConduitSource.cxx | ||
TestConduitSourceExternalMemorySpaces.cxx) | ||
|
||
vtk_test_cxx_executable(vtkConduitCxxTests tests) | ||
|
||
if (TARGET VTK::ParallelMPI) | ||
vtk_add_test_mpi(vtkConduitCxxTests-MPI mpitests | ||
TESTING_DATA NO_VALID NO_OUTPUT | ||
TestDataObjectToConduit.cxx | ||
TestConduitSource.cxx) | ||
TestConduitSource.cxx | ||
TestConduitSourceExternalMemorySpaces.cxx) | ||
|
||
vtk_test_cxx_executable(vtkConduitCxxTests-MPI mpitests) | ||
endif() | ||
|
||
if (TARGET vtkm::cuda) | ||
foreach(src IN LISTS tests) | ||
string(REPLACE "," ";" src ${src}) | ||
list(GET src 0 src) | ||
|
||
set_source_files_properties(${src} PROPERTIES LANGUAGE CUDA) | ||
endforeach() | ||
|
||
#the tests aren't scoped as a child directory of vtkAcceleratorsVTKmDataModel | ||
#so we need to redo this logic | ||
vtkm_get_cuda_flags(CMAKE_CUDA_FLAGS) | ||
|
||
# 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") | ||
endif() | ||
|
||
if (TARGET vtkm::cuda) | ||
# When cuda is enabled VTK::AcceleratorsVTKmDataModel is built statically but with fpic | ||
# enabled so the tests are also built with fpic enabled | ||
set_target_properties(vtkConduitCxxTests PROPERTIES | ||
CUDA_ARCHITECTURES OFF | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
set_target_properties(vtkConduitCxxTests-MPI PROPERTIES | ||
CUDA_ARCHITECTURES OFF | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
endif() |
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
Oops, something went wrong.