Commit Graph

41 Commits

Author SHA1 Message Date
Allison Vacanti
56cc5c3d3a Add support for BitFields.
BitFields are:
- Stored in memory using a contiguous buffer of bits.
- Accessible via portals, a la ArrayHandle.
- Portals operate on individual bits or words.
- Operations may be atomic for safe use from concurrent kernels.

The new BitFieldToUnorderedSet device algorithm produces an ArrayHandle
containing the indices of all set bits, in no particular order.

The new AtomicInterface classes provide an abstraction into bitwise
atomic operations across control and execution environments and are used
to implement the BitPortals.
2019-04-11 08:27:17 -04:00
Robert Maynard
1d20ae4f7b Move DeviceAdapterTag to vtkm/cont 2019-04-04 11:58:51 -04:00
Kenneth Moreland
31b30dbd9d Update arguments to benchmarks
With the functionality of vtkm::cont::Initialize's argument handling
improved, parse the arguments of benchmarks better.
2019-03-26 12:04:31 -06:00
Robert Maynard
46fed414e8 Remove unneeded text from the BenchmarkFilters output
This makes it easier to read as it has less horizontal text for
each line.
2019-03-14 16:30:39 -04:00
Robert Maynard
2321116e8e Filter Benchmarks don't time destruction of results
Previously we would also time the destruction of the results
of the filter
2019-03-13 15:29:33 -04:00
Haocheng LIU
634f523d92 Merge benchmark executables into a device dependent shared library
VTK-m has been updated to replace old per device benchmark executables with a device
dependent shared library so that it's able to accept a device adapter at runtime through
the "--device=" argument.
2019-02-25 12:26:47 -05:00
mclarsen
4cd4637c18 ray tracing now using shared pointers for intersectors 2019-02-22 08:06:04 -08:00
mclarsen
53a8fa7259 rebuilding everything each time for ray benchmark 2019-02-21 15:58:53 -08:00
Haocheng LIU
415252c662 Introduce asynchronous and device independent timer
The timer class now is asynchronous and device independent. it's using an
similiar API as vtkOpenGLRenderTimer with Start(), Stop(), Reset(), Ready(),
and GetElapsedTime() function. For convenience and backward compability, Each
Start() function call will call Reset() internally and each GetElapsedTime()
function call will call Stop() function if it hasn't been called yet for keeping
backward compatibility purpose.

Bascially it can be used in two modes:

* Create a Timer without any device info. vtkm::cont::Timer time;

  * It would enable timers for all enabled devices on the machine. Users can get a
specific elapsed time by passing a device id into the GetElapsedtime function.
If no device is provided, it would pick the maximum of all timer results - the
logic behind this decision is that if cuda is disabled, openmp, serial and tbb
roughly give the same results; if cuda is enabled it's safe to return the
maximum elapsed time since users are more interested in the device execution
time rather than the kernal launch time. The Ready function can be handy here
to query the status of the timer.

* Create a Timer with a device id. vtkm::cont::Timer time((vtkm::cont::DeviceAdapterTagCuda()));

  * It works as the old timer that times for a specific device id.
2019-02-05 12:01:56 -05:00
Kenneth Moreland
887f79c6f4 Make a vtkm_worklet library
This is a library that contains parts of worklets that can be
precompiled into a library.

Currently, this library contains the implementation of ScatterCounting.
2019-01-23 17:09:15 -07:00
Kenneth Moreland
a52211e565 Fix conversion errors in benchmarking code
The recent removal of type selectors in ControlSignature field tags
means that the BenchmarkFieldAlgorithms code was creating code paths
that were never followed and lead to impossible type conversions (e.g.
Vec to float). Fixed the problem by specifing the types for the
VariantArrayHandles better.
2019-01-11 12:23:19 -07:00
Kenneth Moreland
2e426ad547 Run the update-control-signature-tags.sh script 2019-01-11 12:23:10 -07:00
Robert Maynard
543255c374 Move the HumanSize function to Logging.cxx as it is only used by the logger 2019-01-07 16:24:49 -05:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
9ca4d36e28 Update benchmarking to work with ArrayHandleVariant 2018-12-27 14:35:56 -05:00
Robert Maynard
2a8f7ec4c7 Fix more build system issues with separable compilation 2018-12-27 13:19:40 -05:00
Robert Maynard
996dc34c9b The benchmark executables now force device adapters
To make sure we always use the correct device adapter force only
a single device adapter to be on.
2018-12-20 10:16:11 -05:00
Robert Maynard
f02f5ca86f All Benchmark executables now enable logging. 2018-12-20 10:15:37 -05:00
Allison Vacanti
cdb1f5680a Add vtkm::cont::Initialize.
Also
- Renamed vtkm::cont::make_DeviceAdapterIdFromName to just overload
  make_DeviceAdapterId.
- Refactored CMake logic for unit tests
  - Since we're now querying the device tracker for the names, they
    cannot be all caps.
- Updated usages of InitLogging to use Initialize instead.
- Added changelog.
2018-12-13 10:15:44 -05:00
Robert Maynard
169ca722b3 Redesign vtkm::cont::ColorTable to work with separable compilation. 2018-10-31 08:18:08 -04:00
Kenneth Moreland
bddad9b386 Remove TryExecute from filters
Now that the dispatcher does its own TryExecute, filters do not need to
do that. This change requires all worklets called by filters to be able
to execute without knowing the device a priori.
2018-10-16 15:59:53 -06:00
luz.paz
d5beb69ec1 Misc. typos
Found via `codespell`
2018-10-04 10:30:33 -04:00
Allison Vacanti
bd337854ec Initial implementation of general logging.
Addresses #291.
2018-10-02 11:37:55 -04:00
mclarsen
1c2f78ca92 refactoring ray tracing 2018-09-10 19:25:42 -07:00
Kenneth Moreland
ddc85d7385 Merge topic 'dispatcher-auto-device-2'
d879188de Make DispatcherBase invoke using a TryExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1392
2018-08-30 12:59:22 -04:00
Kenneth Moreland
d879188de0 Make DispatcherBase invoke using a TryExecute
Rather than force all dispatchers to be templated on a device adapter,
instead use a TryExecute internally within the invoke to select a device
adapter.

Because this removes the need to declare a device when invoking a
worklet, this commit also removes the need to declare a device in
several other areas of the code.
2018-08-29 19:18:54 -07:00
Allison Vacanti
39f4255263 Add benchmark for atomic arrays. 2018-08-29 12:59:36 -07:00
Allison Vacanti
cf15654112 Merge topic '287_benchmark_exception_handling'
2fd454065 Catch exceptions and continue during benchmarking.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1379
2018-08-28 11:50:49 -04:00
Allison Vacanti
4e290fe135 Add filter benchmarks. 2018-08-24 13:49:46 -04:00
Allison Vacanti
2fd454065f Catch exceptions and continue during benchmarking. 2018-08-24 13:14:13 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Allison Vacanti
761f8986fa Cache inputs to SSI::Unique benchmark.
Sorting the list took 80s. Uniquifying took 3 ms. Only uniquify during
benchmark loop.
2018-05-29 14:46:46 -04:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Allison Vacanti
3a5b4da26e Set device adapter on benchmarks. 2018-05-21 14:47:41 -04:00
Allison Vacanti
9f64c56d16 Prevent FPE in BenchmarkCopySpeed.
UInt64(mean(samples)) may equal zero.
2018-05-21 14:47:01 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
Robert Maynard
0ea06bfdb7 Properly version dynamic libraries and build them in the correct location 2018-01-16 17:23:12 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
75b0efccc9 Correct casting warnings found with new cmake code 2018-01-08 14:00:58 -05:00
Robert Maynard
d07ab6bc4a Refactor benchmarking to be outside the vtkm folder structure
The benchmarking isn't installed as part of vtk-m and therefore shouldn't
be under vtkm/
2018-01-08 14:00:57 -05:00