Skip to content
Snippets Groups Projects

Asynchronous memory allocation for GPUs

Merged Dave Pugmire requested to merge dpugmire/vtk-m:gpu_async_alloc into master
1 file
+ 1
19
Compare changes
  • Side-by-side
  • Inline
@@ -16,10 +16,6 @@
#include <vtkm/cont/ArrayHandleExtractComponent.h>
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/cont/DeviceAdapterTag.h>
#include <vtkm/cont/RuntimeDeviceInformation.h>
#include <vtkm/cont/cuda/internal/CudaAllocator.h>
#include <algorithm>
#include <vector>
@@ -552,7 +548,7 @@ struct VerifyFill
}
};
VTKM_CONT void RunTests()
VTKM_CONT void Run()
{
vtkm::testing::Testing::TryTypes(VerifyEmptyArrays{});
vtkm::testing::Testing::TryTypes(VerifyUserOwnedMemory{});
@@ -565,20 +561,6 @@ VTKM_CONT void RunTests()
vtkm::testing::Testing::TryTypes(VerifyFill{});
}
VTKM_CONT void Run()
{
#ifdef VTKM_CUDA
//For cuda, run tests with and without managed memory.
//When managed memory is off, async cuda malloc will be used.
vtkm::cont::cuda::internal::CudaAllocator::ForceManagedMemoryOff();
RunTests();
vtkm::cont::cuda::internal::CudaAllocator::ForceManagedMemoryOn();
RunTests();
#else
RunTests();
#endif
}
} // anonymous namespace
int UnitTestArrayHandle(int argc, char* argv[])
Loading