Conduit Device Support#1358
Conversation
|
Running with much larger arrays, src starting on host des starting on device |
|
|
||
| // Compute face centers and normals. | ||
| conduit::execution::for_all<ExecPolicy>(0, totalNumFaces, [=](conduit::index_t f) { | ||
| conduit::execution::forall<ExecPolicy>(0, totalNumFaces, [=](conduit::index_t f) { |
There was a problem hiding this comment.
I am confused by this
There was a problem hiding this comment.
wherever this method is called, we want to take a look at the template and consider switching to a policy object choice.
There was a problem hiding this comment.
look into RDC before getting Cyrus' blessing
|
use hatchet/thicket to compare speedup |
| // a TU that lacks that backend would silently fall through to the serial path. | ||
| //----------------------------------------------------------------------------- | ||
| inline void | ||
| validate_runtime_policy(const ExecutionPolicy &policy, |
| //----------------------------------------------------------------------------- | ||
| template <typename T> | ||
| CONDUIT_EXEC T | ||
| atomic_add(ExecutionPolicy policy, T *acc, T value) |
There was a problem hiding this comment.
conditional in the hot path of the loop is really bad
compile with the atomic policy - template, not runtime policy
….com:LLNL/conduit into task/JustinPrivitera/05_01_24/device_support
| static std::string memory_space; | ||
| }; | ||
|
|
||
| #if defined(CONDUIT_TU_IS_CUDA) |
There was a problem hiding this comment.
why do we need to include these into conduit core and conduit? Can't we just have them be included into cpp files and not headers? Then can we just use CONDUIT_USE_*** instead?
Resolves #1358
TODO
Make ticket for follow-on work:
init_device_memory_handlers()should be a static function that people only have to do once. We should have a conduit utility somewhere that should be able to do this somewhere. It should see if the handlers are installed and do it, otherwise do nothing.