@@ -748,59 +748,6 @@ namespace detail {
748748 maybe_print_graphs (ctx);
749749 }
750750
751- TEST_CASE (" graph_generator allows chunks to require empty buffer ranges" , " [graph_generator][command-graph]" ) {
752- using namespace cl ::sycl::access;
753-
754- test_utils::cdag_test_context ctx (3 );
755- auto & inspector = ctx.get_inspector ();
756- test_utils::mock_buffer_factory mbf (ctx);
757- auto buf_a = mbf.create_buffer (cl::sycl::range<1 >(100 ));
758- auto buf_b = mbf.create_buffer (cl::sycl::range<1 >(100 ));
759-
760- test_utils::build_and_flush (ctx, test_utils::add_host_task (ctx.get_task_manager (), on_master_node, [&](handler& cgh) {
761- buf_a.get_access <mode::discard_write>(cgh, fixed<1 >({0 , 100 }));
762- buf_b.get_access <mode::discard_write>(cgh, fixed<1 >({0 , 100 }));
763- }));
764- const auto tid_b = test_utils::build_and_flush (ctx, 3 ,
765- test_utils::add_compute_task<class UKN (task_b)>(
766- ctx.get_task_manager (),
767- [&](handler& cgh) {
768- // NOTE: It's important to construct range-mappers in such a way that passing the
769- // global size (during tdag generation) still returns the correct result!
770- buf_a.get_access <mode::read>(cgh, [&](chunk<1 > chnk) -> subrange<1 > {
771- switch (chnk.offset [0 ]) {
772- case 0 : return chnk;
773- case 34 : return chnk;
774- case 67 : return {0 , 0 }; // Node 2 does not read buffer a
775- default : CATCH_ERROR (" Unexpected offset" );
776- }
777- });
778- buf_b.get_access <mode::read>(cgh, [&](chunk<1 > chnk) -> subrange<1 > {
779- switch (chnk.offset [0 ]) {
780- case 0 : return chnk;
781- case 34 : return {0 , 0 }; // Node 1 does not read buffer b
782- case 67 : return chnk;
783- default : CATCH_ERROR (" Unexpected offset" );
784- }
785- });
786- },
787- cl::sycl::range<1 >{100 }));
788-
789- CHECK (inspector.get_commands (tid_b, std::nullopt , command_type::TASK).size () == 3 );
790- const auto computes_node1 = inspector.get_commands (tid_b, node_id (1 ), command_type::TASK);
791- CHECK (computes_node1.size () == 1 );
792- const auto computes_node2 = inspector.get_commands (tid_b, node_id (2 ), command_type::TASK);
793- CHECK (computes_node2.size () == 1 );
794- const auto await_pushes_node1 = inspector.get_commands (std::nullopt , node_id (1 ), command_type::AWAIT_PUSH);
795- REQUIRE (await_pushes_node1.size () == 1 );
796- CHECK (inspector.has_dependency (*computes_node1.cbegin (), *await_pushes_node1.cbegin ()));
797- const auto await_pushes_node2 = inspector.get_commands (std::nullopt , node_id (2 ), command_type::AWAIT_PUSH);
798- REQUIRE (await_pushes_node2.size () == 1 );
799- CHECK (inspector.has_dependency (*computes_node2.cbegin (), *await_pushes_node2.cbegin ()));
800-
801- maybe_print_graphs (ctx);
802- }
803-
804751 // This is a highly constructed and unrealistic example, but we'd still like the behavior to be clearly defined.
805752 TEST_CASE (" graph_generator generates anti-dependencies for execution commands that have a task-level true dependency" , " [graph_generator][command-graph]" ) {
806753 using namespace cl ::sycl::access;
0 commit comments