88//
99// ===----------------------------------------------------------------------===//
1010
11+ #include < cuda/launch>
1112#include < cuda/memory_pool>
1213#include < cuda/memory_resource>
1314#include < cuda/std/cstdint>
@@ -374,22 +375,21 @@ C2H_CCCLRT_TEST("device_memory_resource comparison", "[memory_resource]")
374375
375376C2H_CCCLRT_TEST (" Async memory resource access" , " " )
376377{
377- /* disable until we move the launch API to libcudacxx
378378 if (cuda::devices.size () > 1 )
379379 {
380380 auto peers = cuda::devices[0 ].peers ();
381381 if (peers.size () > 0 )
382382 {
383383 cuda::device_memory_pool pool{cuda::devices[0 ]};
384- cuda::stream_ref stream{peers.front()};
384+ cuda::stream stream{peers.front ()};
385385 CCCLRT_CHECK (pool.is_accessible_from (cuda::devices[0 ]));
386386
387387 auto allocate_and_check_access = [&](auto & resource) {
388388 auto * ptr1 = resource.allocate (stream, sizeof (int ));
389389 auto * ptr2 = resource.allocate_sync (sizeof (int ));
390- auto config = cudax ::distribute<1>(1);
391- cudax ::launch(stream, config, test::assign_42{}, (int*) ptr1);
392- cudax ::launch(stream, config, test::assign_42{}, (int*) ptr2);
390+ auto config = cuda ::distribute<1 >(1 );
391+ cuda ::launch (stream, config, test::assign_42{}, (int *) ptr1);
392+ cuda ::launch (stream, config, test::assign_42{}, (int *) ptr2);
393393 stream.sync ();
394394 resource.deallocate (stream, ptr1, sizeof (int ));
395395 resource.deallocate_sync (ptr2, sizeof (int ));
@@ -400,7 +400,7 @@ C2H_CCCLRT_TEST("Async memory resource access", "")
400400 CCCLRT_CHECK (pool.is_accessible_from (peers.front ()));
401401 allocate_and_check_access (pool);
402402
403- cudax ::device_memory_pool_ref resource{pool};
403+ cuda ::device_memory_pool_ref resource{pool};
404404 CCCLRT_CHECK (resource.is_accessible_from (peers.front ()));
405405 allocate_and_check_access (resource);
406406
@@ -421,7 +421,9 @@ C2H_CCCLRT_TEST("Async memory resource access", "")
421421
422422 // Check if enable can include the device on which the pool resides
423423 {
424- std::vector peers_ext(peers.begin(), peers.end());
424+ // Separate insert call because GCC 7 doesn't like the constructor from iterators
425+ std::vector<cuda::device_ref> peers_ext;
426+ peers_ext.insert (peers_ext.end (), peers.begin (), peers.end ());
425427 peers_ext.push_back (cuda::devices[0 ]);
426428 pool.enable_access_from (peers_ext);
427429
@@ -439,5 +441,4 @@ C2H_CCCLRT_TEST("Async memory resource access", "")
439441 }
440442 }
441443 }
442- */
443444}
0 commit comments