From e8c08e2c0cf37786a65574b030679cceb7658108 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 12 Jan 2023 23:03:51 +0000 Subject: [PATCH] Fix sycl.scratch_align test --- core/unit_test/TestTeam.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/unit_test/TestTeam.hpp b/core/unit_test/TestTeam.hpp index fc01e9caab..402441b725 100644 --- a/core/unit_test/TestTeam.hpp +++ b/core/unit_test/TestTeam.hpp @@ -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();