conduit icon indicating copy to clipboard operation
conduit copied to clipboard

Conduit Device Support

Open JustinPrivitera opened this issue 1 year ago • 14 comments

Resolves #1151

See #1614 for ongoing development feature-tracking

TODO fix CI

JustinPrivitera avatar Jan 24 '25 00:01 JustinPrivitera

Updated strawman from my talk:

///////////////////////////////////////////////////////////////////////
//
// Strawman API of forall - run on device
//

// DataAccessors wrap node leaf data.
float64_accessor acc_src(node["src"]);
float64_accessor acc_des(node["des"]);

// We ask the DataAccessors to move their data to the device if their data is not already there.
ExecutionPolicy policy = ExecutionPolicy::device();
acc_src.use_with(policy);
acc_des.use_with(policy);

// Our forall will execute on the device because it was passed a device ExecutionPolicy.
index_t size = acc_src.number_of_elements();forall(policy, 0, size, [=] EXEC_LAMBDA(index_t idx)
{
	const float64 val = 2.0 * acc_src[idx];
	acc_des.set(idx, val);
});
CONDUIT_DEVICE_ERROR_CHECK();

// Sync values to node["des"] (no op if node["des"] was originally device memory).
acc_des.sync();

///////////////////////////////////////////////////////////////////////
//
// Strawman API of forall - run on device and leave the result on the device
//

// DataAccessors wrap node leaf data.
float64_accessor acc_src(node["src"]);
float64_accessor acc_des(node["des"]);

// We ask the DataAccessors to move their data to the device if their data is not already there.
ExecutionPolicy policy = ExecutionPolicy::device();
acc_src.use_with(policy);
acc_des.use_with(policy);

// Our forall will execute on the device because it was passed a device ExecutionPolicy.
index_t size = acc_src.number_of_elements();forall(policy, 0, size, [=] EXEC_LAMBDA(index_t idx)
{
	const float64 val = 2.0 * acc_src[idx];
	acc_des.set(idx, val);
});
CONDUIT_DEVICE_ERROR_CHECK();

// node["des"] takes ownership of the data on the device. (no op if node["des"] was originally device memory).
acc_des.assume();

///////////////////////////////////////////////////////////////////////
//
// Strawman API of forall - run wherever the source data is
//

// DataAccessors wrap node leaf data.
float64_accessor acc_src(node["src"]);
float64_accessor acc_des(node["des"]);

// We ask the ExecutionAccessors to move their data to the memory space occupied by node["src"] if their data is not already there.
ExecutionPolicy policy = acc_src.active_space();
acc_src.use_with(policy);
acc_des.use_with(policy);

// Our forall will execute on the memory space occupied by node["src"] because it was passed an ExecutionPolicy for that space. 
index_t size = acc_src.number_of_elements();forall(policy, 0, size, [=] EXEC_LAMBDA(index_t idx)
{
	const float64 val = 2.0 * acc_src[idx];
	acc_des.set(idx, val);
});
CONDUIT_DEVICE_ERROR_CHECK();

// Sync values to node["des"] (no op if node["des"] was originally in the same memory space as node["src"]).
acc_des.sync(); 

JustinPrivitera avatar Apr 10 '26 23:04 JustinPrivitera

we want dataaccessor and dataarray bulk set to use execution foralls

JustinPrivitera avatar Apr 16 '26 17:04 JustinPrivitera

Running on device performance annotations:

[ RUN      ] conduit_execution.strawman_data_accessor_src_host_des_host
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 727]
 data_accessor sync policy=host src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000013      0.000013      0.000013 1.035794 
forall        0.000002      0.000002      0.000002 0.178694 
sync          0.000000      0.000000      0.000000 0.026093 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 758]
 data_accessor sync policy=device src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000045      0.000045      0.000045 42.418154 
forall        0.000022      0.000022      0.000022 20.814752 
sync          0.000009      0.000009      0.000009  8.665772 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 788]
 data_accessor assume policy=host src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000004      0.000004      0.000004 9.062827 
forall        0.000001      0.000001      0.000001 3.446427 
assume        0.000000      0.000000      0.000000 0.740344 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 819]
 data_accessor assume policy=device src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000032      0.000032      0.000032 36.137612 
forall        0.000022      0.000022      0.000022 24.247576 
assume        0.000005      0.000005      0.000005  5.547416 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 849]
 data_accessor active_space src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000002      0.000002      0.000002 5.671215 
forall        0.000001      0.000001      0.000001 2.981023 
sync          0.000000      0.000000      0.000000 0.557427 
[       OK ] conduit_execution.strawman_data_accessor_src_host_des_host (20 ms)
[ RUN      ] conduit_execution.strawman_data_accessor_src_device_des_device
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 896]
 data_accessor sync policy=host src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000031      0.000031      0.000031 43.576911 
forall        0.000001      0.000001      0.000001  0.936657 
sync          0.000009      0.000009      0.000009 12.106639 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 930]
 data_accessor sync policy=device src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  4.267349 
forall        0.000022      0.000022      0.000022 39.046247 
sync          0.000000      0.000000      0.000000  0.515638 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 964]
 data_accessor assume policy=host src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000031      0.000031      0.000031 48.288204 
forall        0.000001      0.000001      0.000001  1.042639 
assume        0.000001      0.000001      0.000001  0.871460 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 998]
 data_accessor assume policy=device src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  4.347748 
forall        0.000022      0.000022      0.000022 39.650743 
assume        0.000000      0.000000      0.000000  0.503045 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1031]
 data_accessor active_space src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  2.706205 
forall        0.000023      0.000023      0.000023 38.510111 
sync          0.000000      0.000000      0.000000  0.475636 
[       OK ] conduit_execution.strawman_data_accessor_src_device_des_device (17 ms)
[ RUN      ] conduit_execution.strawman_data_accessor_src_host_des_device
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1083]
 data_accessor sync policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 33.800324 
forall        0.000001      0.000001      0.000001  1.017549 
sync          0.000009      0.000009      0.000009 13.744286 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1115]
 data_accessor sync policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 30.835658 
forall        0.000019      0.000019      0.000019 25.773881 
sync          0.000000      0.000000      0.000000  0.345423 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1147]
 data_accessor assume policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 41.008198 
forall        0.000001      0.000001      0.000001  1.203558 
assume        0.000001      0.000001      0.000001  0.941915 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1179]
 data_accessor assume policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 29.926998 
forall        0.000020      0.000020      0.000020 26.505102 
assume        0.000000      0.000000      0.000000  0.376032 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1210]
 data_accessor active_space src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000022      0.000022      0.000022 32.417005 
forall        0.000001      0.000001      0.000001  0.991438 
sync          0.000009      0.000009      0.000009 14.015322 
[       OK ] conduit_execution.strawman_data_accessor_src_host_des_device (17 ms)
[ RUN      ] conduit_execution.strawman_data_accessor_src_device_des_host
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1260]
 data_accessor sync policy=host src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 41.360101 
forall        0.000001      0.000001      0.000001  1.138304 
sync          0.000000      0.000000      0.000000  0.482917 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1292]
 data_accessor sync policy=device src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 26.763990 
forall        0.000019      0.000019      0.000019 22.451309 
sync          0.000010      0.000010      0.000010 10.989264 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1324]
 data_accessor assume policy=host src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 41.146114 
forall        0.000001      0.000001      0.000001  1.077305 
assume        0.000000      0.000000      0.000000  0.364894 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1356]
 data_accessor assume policy=device src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000031      0.000031      0.000031 36.780463 
forall        0.000020      0.000020      0.000020 23.142552 
assume        0.000001      0.000001      0.000001  0.844961 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1388]
 data_accessor active_space src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000022      0.000022      0.000022 26.054129 
forall        0.000020      0.000020      0.000020 22.964340 
sync          0.000009      0.000009      0.000009 10.198629 
[       OK ] conduit_execution.strawman_data_accessor_src_device_des_host (22 ms)
[ RUN      ] conduit_execution.strawman_data_array_src_host_des_host
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1432]
 data_array sync policy=host src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000004      0.000004      0.000004 8.085955 
forall        0.000001      0.000001      0.000001 2.171023 
sync          0.000000      0.000000      0.000000 0.465219 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1463]
 data_array sync policy=device src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000033      0.000033      0.000033 33.707297 
forall        0.000021      0.000021      0.000021 21.709441 
sync          0.000010      0.000010      0.000010  9.711586 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1493]
 data_array assume policy=host src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000003      0.000003      0.000003 8.227539 
forall        0.000001      0.000001      0.000001 2.856445 
assume        0.000000      0.000000      0.000000 0.561523 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1524]
 data_array assume policy=device src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000033      0.000033      0.000033 37.082169 
forall        0.000021      0.000021      0.000021 23.655674 
assume        0.000001      0.000001      0.000001  0.827278 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1554]
 data_array active_space src_start=host des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %   
use_with      0.000002      0.000002      0.000002 4.530120 
forall        0.000001      0.000001      0.000001 2.746988 
sync          0.000000      0.000000      0.000000 0.602410 
[       OK ] conduit_execution.strawman_data_array_src_host_des_host (17 ms)
[ RUN      ] conduit_execution.strawman_data_array_src_device_des_device
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1601]
 data_array sync policy=host src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000032      0.000032      0.000032 42.392871 
forall        0.000001      0.000001      0.000001  0.825580 
sync          0.000009      0.000009      0.000009 11.610536 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1635]
 data_array sync policy=device src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  4.031381 
forall        0.000022      0.000022      0.000022 37.620649 
sync          0.000000      0.000000      0.000000  0.485104 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1669]
 data_array assume policy=host src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000050      0.000050      0.000050 57.448847 
forall        0.000001      0.000001      0.000001  0.738595 
assume        0.000001      0.000001      0.000001  0.623190 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1703]
 data_array assume policy=device src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  3.984785 
forall        0.000023      0.000023      0.000023 37.295615 
assume        0.000000      0.000000      0.000000  0.477516 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1736]
 data_array active_space src_start=device des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000002      0.000002      0.000002  2.745596 
forall        0.000024      0.000024      0.000024 38.676401 
sync          0.000000      0.000000      0.000000  0.460244 
[       OK ] conduit_execution.strawman_data_array_src_device_des_device (17 ms)
[ RUN      ] conduit_execution.strawman_data_array_src_host_des_device
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1788]
 data_array sync policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 34.119339 
forall        0.000001      0.000001      0.000001  0.920201 
sync          0.000009      0.000009      0.000009 13.515457 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1820]
 data_array sync policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 20.982372 
forall        0.000020      0.000020      0.000020 17.556476 
sync          0.000000      0.000000      0.000000  0.251706 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1852]
 data_array assume policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 38.849937 
forall        0.000001      0.000001      0.000001  1.018046 
assume        0.000001      0.000001      0.000001  0.886685 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1884]
 data_array assume policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 29.426559 
forall        0.000020      0.000020      0.000020 24.597586 
assume        0.000000      0.000000      0.000000  0.364688 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1915]
 data_array active_space src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 31.930885 
forall        0.000001      0.000001      0.000001  0.847685 
sync          0.000009      0.000009      0.000009 13.322784 
[       OK ] conduit_execution.strawman_data_array_src_host_des_device (17 ms)
[ RUN      ] conduit_execution.strawman_data_array_src_device_des_host
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1965]
 data_array sync policy=host src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 39.098698 
forall        0.000001      0.000001      0.000001  0.991693 
sync          0.000000      0.000000      0.000000  0.406431 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1997]
 data_array sync policy=device src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 26.141669 
forall        0.000020      0.000020      0.000020 22.111262 
sync          0.000010      0.000010      0.000010 11.240358 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 2029]
 data_array assume policy=host src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000024      0.000024      0.000024 38.297189 
forall        0.000001      0.000001      0.000001  0.915663 
assume        0.000000      0.000000      0.000000  0.433735 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 2061]
 data_array assume policy=device src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000023      0.000023      0.000023 29.137909 
forall        0.000019      0.000019      0.000019 24.444723 
assume        0.000001      0.000001      0.000001  0.928598 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 2093]
 data_array active_space src_start=device des_start=host
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.000022      0.000022      0.000022 25.129777 
forall        0.000020      0.000020      0.000020 22.257156 
sync          0.000009      0.000009      0.000009  9.772565 
[       OK ] conduit_execution.strawman_data_array_src_device_des_host (17 ms)

JustinPrivitera avatar Apr 20 '26 17:04 JustinPrivitera

Running with much larger arrays, src starting on host des starting on device

[ RUN      ] conduit_execution.strawman_data_accessor_src_host_des_device
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1079]
 data_accessor sync policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.001430      0.001430      0.001430  1.311628 
forall        0.106097      0.106097      0.106097 97.336826 
sync          0.001413      0.001413      0.001413  1.296252 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1107]
 data_accessor sync policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.008063      0.008063      0.008063 98.000095 
forall        0.000116      0.000116      0.000116  1.414218 
sync          0.000000      0.000000      0.000000  0.003525 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1135]
 data_accessor assume policy=host src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.001418      0.001418      0.001418  1.348748 
forall        0.103654      0.103654      0.103654 98.604876 
assume        0.000001      0.000001      0.000001  0.001389 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1163]
 data_accessor assume policy=device src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.007959      0.007959      0.007959 98.013778 
forall        0.000115      0.000115      0.000115  1.415281 
assume        0.000000      0.000000      0.000000  0.003941 
[/usr/workspace/justin/conduit_builds/develop_04_03_2026_HIP/conduit/src/tests/conduit/t_conduit_execution.cpp : 1190]
 data_accessor active_space src_start=host des_start=device
Path     Min time/rank Max time/rank Avg time/rank Time %    
use_with      0.001423      0.001423      0.001423  1.318741 
forall        0.105016      0.105016      0.105016 97.324327 
sync          0.001414      0.001414      0.001414  1.310595 
[       OK ] conduit_execution.strawman_data_accessor_src_host_des_device (1106 ms)

JustinPrivitera avatar Apr 22 '26 23:04 JustinPrivitera

use hatchet/thicket to compare speedup

JustinPrivitera avatar Apr 24 '26 23:04 JustinPrivitera

To pass CI: we need to decide if Umpire being off means device support is off. Right now we are asking to run on device but Umpire is not enabled, so tests fail. This is a real case we ought to handle, but we should also address why the CI containers are building RAJA but not Umpire @cyrush.

JustinPrivitera avatar May 26 '26 23:05 JustinPrivitera

There is no reason to support RAJA on and Umpire off.

Device support should require both on.

cyrush avatar May 26 '26 23:05 cyrush

There is no reason to support RAJA on and Umpire off.

Device support should require both on.

I have changed the device enabled function to take into account if umpire is enabled.

Can you check that the CI containers have both umpire and raja or neither?

JustinPrivitera avatar May 27 '26 00:05 JustinPrivitera

Looks like we are past failures due to tpl builds. The exec test are failing in the azure instances.

I think github actions instances are failing on the using-with-zz checks, which is likely related to the C++ standard in the test project not being consistent with what camp/raja etc need.

cyrush avatar May 27 '26 15:05 cyrush

TODO add a new macro for cuda + hip + umpire == CONDUIT_USE_DEVICE

JustinPrivitera avatar May 27 '26 20:05 JustinPrivitera

🐊

cyrush avatar May 28 '26 15:05 cyrush

/usr/WS2/justin/conduit_builds/develop_06_10_26_CUDA/conduit/src/tests/conduit/execution_test_utils.hpp(336): error: An extended __host__ __device__ lambda cannot be defined inside a generic lambda expression("operator()").
                                                                   (index_t idx)
                                                                   ^

/usr/WS2/justin/conduit_builds/develop_06_10_26_CUDA/conduit/src/tests/conduit/execution_test_utils.hpp(391): error: An extended __host__ __device__ lambda cannot be defined inside a generic lambda expression("operator()").
                                                                   (index_t idx)
                                                                   ^

/usr/WS2/justin/conduit_builds/develop_06_10_26_CUDA/conduit/src/tests/conduit/t_conduit_execution.cpp(118): error: The enclosing parent function ("TestBody") for an extended __host__ __device__ lambda cannot have private or protected access within its class
                                                                     (index_t i)
                                                                     ^


JustinPrivitera avatar Jun 16 '26 20:06 JustinPrivitera

AI says about Windows CI:

So the diagnosis is: the Windows CI is failing at compile time due to clang-cl 19.1.7 being too old for the current MSVC STL on that runner. Upgrading the workflow to Clang 20+ or switching that job to MSVC cl.exe should address the root cause.

JustinPrivitera avatar Jun 23 '26 21:06 JustinPrivitera

@cyrush how does MPI play into our work this summer?

JustinPrivitera avatar Jun 23 '26 23:06 JustinPrivitera

Putting these here to reference later, they're extra caliper options for openmp/GPU:

  • https://github.com/llnl/Caliper/blob/1aa3c362b41d36b5096a223231d0e0d104542a45/doc/sphinx/RegionFiltering.rst#L5
  • https://github.com/llnl/Caliper/blob/1aa3c362b41d36b5096a223231d0e0d104542a45/doc/sphinx/OpenMP.rst#L106
  • https://github.com/llnl/Caliper/blob/1aa3c362b41d36b5096a223231d0e0d104542a45/doc/sphinx/GPUProfiling.rst#L16

siramok avatar Jul 01 '26 02:07 siramok

The device execution model doesn't currently expose a way for the user to globally override the execution policies determined at compile-time (as far as I know anyways).

It's unclear to me whether this would be useful beyond benchmarking (maybe for debugging?), but for example, at any level of abstraction above executing our fundamental operations directly (atomics, reducers, etc.) it's currently only possible to ask for host vs device execution. However, the underlying host/device execution policies are automatically set to the best available policy at compile-time. This means that it's currently not possible to benchmark the serial execution policy if conduit was built with RAJA + openmp, since asking for host execution will always use openmp.

siramok avatar Jul 02 '26 23:07 siramok

The device execution model doesn't currently expose a way for the user to globally override the execution policies determined at compile-time (as far as I know anyways).

I will fix this.

JustinPrivitera avatar Jul 10 '26 21:07 JustinPrivitera

@siramok we should have a test to look at shared memory APUs. Sync should be a no-op in that case. Perhaps we need to ask if memory is device/host-accessible versus device/host memory. Use rocprof for loop test that moves things around.

JustinPrivitera avatar Jul 16 '26 16:07 JustinPrivitera

@siramok we should hack a allocated bytes counter to the host/device allocators so that we can query these when we are done to check things.

JustinPrivitera avatar Jul 16 '26 16:07 JustinPrivitera