Skip to content

Commit

Permalink
Fix sycl.scratch_align test
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Jan 23, 2023
1 parent 2bde8fc commit e8c08e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/unit_test/TestTeam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1642,9 +1642,12 @@ struct TestScratchAlignment {
// and since scratch_ptr3 is then already aligned it difference
// should match that
if ((scratch_ptr3 - scratch_ptr2) != 32) flag() = 1;

// check actually alignment of ptrs is as requested
if (((scratch_ptr1 % 4) != 0) || ((scratch_ptr2 % 8) != 0) ||
((scratch_ptr3 % 4) != 0))
// cast to int here to avoid failure with icpx in mixed integer type
// comparison
if ((int(scratch_ptr1 % 4) != 0) || (int(scratch_ptr2 % 8) != 0) ||
(int(scratch_ptr3 % 4) != 0))
flag() = 1;
});
Kokkos::fence();
Expand Down

0 comments on commit e8c08e2

Please sign in to comment.