@@ -507,10 +507,11 @@ bool check_test(const std::vector<float> &out,
507507 }
508508
509509 if (mismatch) {
510- #ifdef VERBOSE_PRINT
511- std::cout << " Result mismatch! Expected: " << expected[i]
512- << " , Actual: " << out[i] << std::endl;
513- #else
510+ std::cout << " Result mismatch at index " << i
511+ << " ! Expected: " << expected[i] << " , Actual: " << out[i]
512+ << std::endl;
513+ #ifndef VERBOSE_PRINT
514+ // In CI, only display the first mismatched index
514515 break ;
515516#endif
516517 }
@@ -544,42 +545,65 @@ bool run_copy_test(sycl::device &dev, sycl::queue &q, sycl::range<1> dims) {
544545 // Perform copy checks
545546 copy_image_mem_handle_to_image_mem_handle (dataInDesc, outDesc, dataIn1,
546547 dataIn2, dev, q, out);
547-
548- validated = validated && check_test (out, expected);
548+ if (!check_test (out, expected)) {
549+ std::cout << " copy_image_mem_handle_to_image_mem_handle test failed"
550+ << std::endl;
551+ validated = false ;
552+ }
549553
550554 std::fill (out.begin (), out.end (), 0 );
551555
552556 copy_image_mem_handle_to_usm (dataInDesc, outDesc, dataIn1, dataIn2, dev, q,
553557 out);
554-
555- validated = validated && check_test (out, expected);
558+ if (!check_test (out, expected)) {
559+ std::cout << " copy_image_mem_handle_to_usm test failed" << std::endl;
560+ validated = false ;
561+ }
556562
557563 std::fill (out.begin (), out.end (), 0 );
558564
559565 copy_usm_to_image_mem_handle (dataInDesc, outDesc, dataIn1, dataIn2, dev, q,
560566 out);
561-
562- validated = validated && check_test (out, expected);
567+ if (!check_test (out, expected)) {
568+ std::cout << " copy_usm_to_image_mem_handle test failed" << std::endl;
569+ validated = false ;
570+ }
563571
564572 std::fill (out.begin (), out.end (), 0 );
565573
566574 copy_usm_to_usm (dataInDesc, outDesc, dataIn1, dataIn2, dev, q, out);
567-
568- validated = validated && check_test (out, expected);
575+ if (!check_test (out, expected)) {
576+ std::cout << " copy_usm_to_usm test failed" << std::endl;
577+ validated = false ;
578+ }
569579
570580 // Perform out of bounds copy checks
571- validated =
572- validated && image_mem_handle_to_image_mem_handle_out_of_bounds_copy (
573- dataInDesc, outDesc, dataIn1, dev, q);
581+ if (!image_mem_handle_to_image_mem_handle_out_of_bounds_copy (
582+ dataInDesc, outDesc, dataIn1, dev, q)) {
583+ std::cout
584+ << " image_mem_handle_to_image_mem_handle_out_of_bounds_copy test failed"
585+ << std::endl;
586+ validated = false ;
587+ }
574588
575- validated = validated && image_mem_handle_to_usm_out_of_bounds_copy (
576- dataInDesc, outDesc, dataIn1, dev, q);
589+ if (!image_mem_handle_to_usm_out_of_bounds_copy (dataInDesc, outDesc, dataIn1,
590+ dev, q)) {
591+ std::cout << " image_mem_handle_to_usm_out_of_bounds_copy test failed"
592+ << std::endl;
593+ validated = false ;
594+ }
577595
578- validated = validated && usm_to_image_mem_handle_out_of_bounds_copy (
579- dataInDesc, outDesc, dataIn1, dev, q);
596+ if (!usm_to_image_mem_handle_out_of_bounds_copy (dataInDesc, outDesc, dataIn1,
597+ dev, q)) {
598+ std::cout << " usm_to_image_mem_handle_out_of_bounds_copy test failed"
599+ << std::endl;
600+ validated = false ;
601+ }
580602
581- validated = validated && usm_to_usm_out_of_bounds_copy (dataInDesc, outDesc,
582- dataIn1, dev, q);
603+ if (!usm_to_usm_out_of_bounds_copy (dataInDesc, outDesc, dataIn1, dev, q)) {
604+ std::cout << " usm_to_usm_out_of_bounds_copy test failed" << std::endl;
605+ validated = false ;
606+ }
583607
584608 return validated;
585609}
0 commit comments