Commit Graph

1860 Commits

Author SHA1 Message Date
Robert Maynard
aef087fc00 Merge topic 'remove_runtime_device_tracker_from_try_execute'
2d477fd53 Remove ability to pass a runtime device tracker to TryExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1616
2019-04-02 14:43:16 -04:00
Kenneth Moreland
04254dbd25 Merge topic 'specialize-worklet-for-device'
4e34feecb Add ability to specialize worklet for device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1608
2019-04-02 12:08:01 -04:00
Robert Maynard
2d477fd531 Remove ability to pass a runtime device tracker to TryExecute
Since runtime device trackers are single instance per thread
the ability to pass them around to other functions is unneeded.
2019-04-02 10:44:30 -04:00
Robert Maynard
f350517de2 Merge topic 'less_vtkm_cont_files_bring_in_cuda_device'
18ff6681f Less vtkm_cont cxx files bring in the cuda device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1612
2019-04-01 12:02:55 -04:00
Kenneth Moreland
4e34feecb4 Add ability to specialize worklet for device
This adds an ExecutionSignature tag named Device that passes the
DeviceAdapterTag as an argument to the worklet's operator(). This allows
worklets to specialize their code based on the device.
2019-04-01 10:01:54 -06:00
Robert Maynard
e787d52afc Merge branch 'optionparser-to-third-party' into 'master'
Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h

See merge request vtk/vtk-m!1593
2019-04-01 10:56:01 -04:00
Robert Maynard
18ff6681fb Less vtkm_cont cxx files bring in the cuda device
When you have CUDA enabled we need to make sure that all worklet
launches come from a cuda file otherwise we will generate ODR
violations.
2019-04-01 08:21:07 -04:00
Robert Maynard
b9e0e541b8 VTK-m once again uses consistent include style 2019-03-28 14:12:08 -04:00
Kenneth Moreland
7993c2b353 Merge topic 'parse-some-options-in-initialize'
31b30dbd9 Update arguments to benchmarks
b0303c96e Allow Initialize to parse only some arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1603
2019-03-27 12:43:58 -04:00
Allison Vacanti
68abfccd7e Merge topic 'cuda10.1'
0581b368f Fix issues with importing installed vtkm::cuda after refactor.
ed4374b05 diy 2019-03-13 (e8e68c7c)
b85dcf229 Add more vtkm_cont compilation units to device_sources.
9014de0eb Suppress new host/device warnings for cuda 10.1.
04a464cc4 Update cuda detection to create vtkm::cuda as an interface library.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1582
2019-03-27 12:12:02 -04:00
Sujin Philip
34a49234cb Merge topic 'fix-cellset-permutation'
048cbda5e Simplify CellSetPermutation PointToCell

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1599
2019-03-27 08:28:48 -04:00
Kenneth Moreland
7237c46898 Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h
Previously we just took the optionparser.h file and stuck it right in
our source code. That was problematic for a variety of reasons.

1. It incorrectly assigned our license to external code.
2. It made lots of unnecessary changes to the original source (like
reformatting).
3. It made it near impossible to track patches we make and updates to
the original software.

Instead, use the third-party system to track changes to optionparser.h
in a different repository and then pull that into ours.
2019-03-26 15:47:17 -06:00
Allison Vacanti
b85dcf2294 Add more vtkm_cont compilation units to device_sources.
These depend on DeviceAdapterTagCuda::IsEnabled being correctly
set at compile time.
2019-03-26 14:53:42 -04:00
Kenneth Moreland
b0303c96ed Allow Initialize to parse only some arguments
When a library requires reading some command line arguments through a
function like Initialize, it is typical that it will parse through
arguments it supports and then remove those arguments from argc and argv
so that the remaining arguments can be parsed by the calling program.
VTK-m's initialize did not do that, so add that functionality.
2019-03-26 12:04:18 -06:00
Sujin Philip
048cbda5e1 Simplify CellSetPermutation PointToCell
These changes are required to enable 'CellSetPermutaion' of custom cell-set
types like 'vtkmCellSetExplicit' and 'vtkmCellSetSingleType' in VTK.
2019-03-26 13:07:11 -04:00
Robert Maynard
d1a957bf5c Merge topic 'refactor_runtime_device_tracker'
838cb4337 Redesign RuntimeDeviceTracker and RuntimeDeviceInformation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1600
2019-03-26 10:08:31 -04:00
Robert Maynard
838cb43375 Redesign RuntimeDeviceTracker and RuntimeDeviceInformation
The RuntimeDeviceTracker had grown organically to handle multiple
different roles inside VTK-m. Now that we have device tags
that can be passed around at runtime, large portions of
the RuntimeDeviceTracker API aren't needed.

Additionally the RuntimeDeviceTracker had a dependency on knowing
the names of each device, and this wasn't possible
as that information was part of its self. Now we have moved that
information into RuntimeDeviceInformation and have broken
the recursion.
2019-03-26 08:36:18 -04:00
Allison Vacanti
ad15ae1553 Merge topic 'Variant_As'
e1f5c4dd9 Modify VariantAH::AsVirtual to cast to new ValueType if needed.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1585
2019-03-25 16:39:39 -04:00
Allison Vacanti
e1f5c4dd9b Modify VariantAH::AsVirtual to cast to new ValueType if needed.
E.g:

```
    ArrayHandle<Float64> doubleArray;
    VariantArrayHandle varHandle{doubleArray};
    ArrayHandleVirtual<Float32> = varHandle.AsVirtual<Float32>();
```

If there is a loss in range and/or precision, a warning is logged. If
the ValueTypes are Vecs with mismatched widths, an ErrorBadType is thrown.
Internally, an ArrayHandleCast is used between the VariantArrayHandle's
stored array and the ArrayHandleVirtual.
2019-03-25 11:39:45 -04:00
Robert Maynard
256e0c3c11 Merge topic 'rename_to_GetRuntimeDeviceTracker'
ae11e115a RuntimeDeviceTracker: Remove `Global` from names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1592
2019-03-24 08:17:02 -04:00
Sujin Philip
96f4a17e4f Merge topic 'improve-cellset-api'
a09bb9eca Add a new test for CellSet API
8868fb989 Improve CellSet API

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1589
2019-03-22 12:52:31 -04:00
Robert Maynard
ae11e115a0 RuntimeDeviceTracker: Remove Global from names 2019-03-22 08:53:26 -07:00
Sujin Philip
a09bb9eca3 Add a new test for CellSet API 2019-03-22 09:35:57 -04:00
Kenneth Moreland
07fe1060a0 Merge topic 'bounding-interval-hierarchy-in-vtkm-cont'
5960b8abf Suppress nvlink warnings about virtual methods not used
0af017b03 Move virtual methods of other CellLocators to vtkm_cont
e87864b0e Put CellLocatorBoundingIntervalHierarchy in vtkm_cont library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1594
2019-03-21 13:41:06 -04:00
Kenneth Moreland
0af017b038 Move virtual methods of other CellLocators to vtkm_cont
These changes caused some warnings in clang to show up based on virtual
methods in other cell locators. Hence, the rest of the cell locators
have also had some of their code moved to vtkm_cont.
2019-03-20 17:38:50 -06:00
Kenneth Moreland
e87864b0e3 Put CellLocatorBoundingIntervalHierarchy in vtkm_cont library
All of the methods in CellLocatorBoundingIntervalHierarchy were listed in
header files. This is sometimes problematic with virtual methods. Since
everything implemented in it can just be embedded in a library, move the
code into the vtkm_cont library.
2019-03-20 17:33:08 -06:00
Robert Maynard
6cdf6cb672 Less aggressive defaults for VTK-m compared to summit.
Since we don't have per system checks currently built into
vtk-m we can't use the tuned values for Summit, as they
don't run on all our hardware.
2019-03-20 09:30:34 -07:00
Robert Maynard
3879479185 Improve VTK-m cuda scheduling based on Summit scaling study
When benchmarking the VTK-m algorithms on Summit I discovered
that our scheduling choices aren't optimal for the hardware.

This is a short term fix where we select good numbers for
Summit, and in the future make the defaults controllable
by the calling programming and/or environment variables.

Performance numbers can be found at:
  https://gitlab.kitware.com/snippets/755
2019-03-20 09:30:34 -07:00
Sujin Philip
8868fb989b Improve CellSet API
Add useful virtual functions to the vtkm::cont::CellSet base class.
2019-03-19 16:12:48 -04:00
Sujin Philip
b44d1b2d6b Merge topic 'fix-variant-warnings'
cb76f4c79 Fix VariantArrayHandle override warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1588
2019-03-19 11:34:37 -04:00
Sujin Philip
40814576b6 Merge topic 'improve-point-locator'
178da6c0d Make PointLocatorUniformGrid default constructible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1587
2019-03-19 10:43:13 -04:00
Sujin Philip
cb76f4c791 Fix VariantArrayHandle override warnings
Add override consistently to all overriden functions.
2019-03-19 08:28:08 -04:00
Sujin Philip
178da6c0dc Make PointLocatorUniformGrid default constructible
plus some style changes to match VTK-m style.
2019-03-18 16:34:49 -04:00
Sujin Philip
1d4c8f35b5 Merge topic 'fix-VariantArrayHandle'
546a1d14a VariantArrayHandle should report run time NumberOfComponents

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1586
2019-03-18 12:35:54 -04:00
Kenneth Moreland
163b694b9d Merge topic 'fix-timer-test'
92b4e054a Fix issues with timer test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1584
2019-03-17 11:58:28 -04:00
Dave Pugmire
07273c88f2 Merge topic 'gridEval'
3868a5b30 Remove the commented out stack code.
e7066ad94 compiler errors.
de7d9cc27 fix compile errors, remove cudastack hacks.
9b9742f43 Merge branch 'no-recurse-bih' of https://gitlab.kitware.com/kmorel/vtk-m into gridEval
ab9d0fad2 Remove warning exceptions for BoundingIntervalHierarchy recursive calls
8127093a2 Add CellLocator to name of BoundingIntervalHierarchy
c008df90c Non-recursive method to find cells in BoundingIntervalHierarchyExec
c463bbec9 Add parent index to BIH tree
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1536
2019-03-16 22:14:10 -04:00
Sujin Philip
ceca8ab105 Merge topic 'improve-field-api'
d4e1c1825 Update existing code to use the new functions
7b072b159 Add useful Get functions to Fields and Coordinates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1578
2019-03-15 17:51:49 -04:00
Sujin Philip
546a1d14a2 VariantArrayHandle should report run time NumberOfComponents
Query and report number of components at runtime so that it can work with
arrays of types with runtime varying number of components
Eg. ArrayHandleGroupVecVariable.
2019-03-15 16:47:32 -04:00
Dave Pugmire
3868a5b304 Remove the commented out stack code. 2019-03-15 15:14:09 -04:00
Dave Pugmire
e7066ad94b compiler errors. 2019-03-15 14:46:25 -04:00
Kenneth Moreland
92b4e054af Fix issues with timer test
The timer test would blindly wait for an expected interval each time.
However, in a busy system that might wait more than expected, this extra
wait time can accumulate. Fix the issue by monitoring how much time has
actually elapsed and only wait to the next expected point. Also add a
check to make sure that we have not waited too long (and adjust the
error message to hopefully make it more clear that the system waited
more than expected).
2019-03-15 11:50:17 -06:00
Dave Pugmire
de7d9cc27b fix compile errors, remove cudastack hacks. 2019-03-15 13:40:48 -04:00
Sujin Philip
d4e1c18254 Update existing code to use the new functions 2019-03-15 13:28:55 -04:00
Sujin Philip
7b072b1593 Add useful Get functions to Fields and Coordinates
Avoid having to call 'GetData()' to query 'NumberOfValues'/'NumberOfPoints'.
2019-03-15 13:28:55 -04:00
Dave Pugmire
9b9742f436 Merge branch 'no-recurse-bih' of https://gitlab.kitware.com/kmorel/vtk-m into gridEval 2019-03-15 13:05:39 -04:00
Kenneth Moreland
8127093a2f Add CellLocator to name of BoundingIntervalHierarchy
This will help identify the nature of this object as well as find cell
locator implementations.
2019-03-14 16:13:59 -06:00
Kenneth Moreland
c463bbec93 Add parent index to BIH tree
This will help us traverse back up the tree without a call stack (which
is causing issues on CUDA).
2019-03-14 15:52:47 -06:00
Sujin Philip
24fc4ec944 Fix ArrayHandleGroupVecVariable
Take the const portal for the offsets array for all casses.
2019-03-14 13:54:25 -04:00
Dave Pugmire
6edda87c3a Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into gridEval 2019-03-14 13:40:33 -04:00
Dave Pugmire
533f2e5eb3 Cleanup. 2019-03-14 09:39:56 -04:00