From 19d2ff01b0bccd01f8a9fa08a80c16b98423106a Mon Sep 17 00:00:00 2001 From: aelovikov-intel Date: Mon, 23 Dec 2024 15:33:26 -0800 Subject: [PATCH] Revert "Add e2e test for queue::fill with a range of pattern sizes (#15991)" This reverts commit 805754c5f457edff79870966a3d99abc282fc0b8. --- sycl/test-e2e/USM/fill_any_size.cpp | 81 ----------------------------- 1 file changed, 81 deletions(-) delete mode 100644 sycl/test-e2e/USM/fill_any_size.cpp diff --git a/sycl/test-e2e/USM/fill_any_size.cpp b/sycl/test-e2e/USM/fill_any_size.cpp deleted file mode 100644 index 91f215d517633..0000000000000 --- a/sycl/test-e2e/USM/fill_any_size.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// RUN: %{build} -o %t1.out -// RUN: %{run} %t1.out -// XFAIL: (opencl && cpu) -// XFAIL-TRACKER: https://github.com/oneapi-src/unified-runtime/issues/2440 - -/** - * Test of the queue::fill interface with a range of pattern sizes and values. - * - * Loops over pattern sizes from 1 to MaxPatternSize bytes and calls queue::fill - * with std::array for the pattern. Two pattern values are tested, - * all zeros and value=index+42. The output is copied back to host and - * validated. - */ - -#include -#include -#include -#include - -constexpr size_t MaxPatternSize{32}; // Bytes. -constexpr size_t NumElements{10}; -constexpr size_t NumRepeats{1}; -constexpr bool verbose{false}; - -template -int test(sycl::queue &q, uint8_t firstValue = 0) { - using T = std::array; - T value{}; - for (size_t i{0}; i < PatternSize; ++i) { - if constexpr (SameValue) { - value[i] = firstValue; - } else { - value[i] = firstValue + i; - } - } - - T *dptr{sycl::malloc_device(NumElements, q)}; - for (size_t repeat{0}; repeat < NumRepeats; ++repeat) { - q.fill(dptr, value, NumElements).wait(); - } - - std::array host{}; - q.copy(dptr, host.data(), NumElements).wait(); - bool pass{true}; - for (size_t i{0}; i < NumElements; ++i) { - for (size_t j{0}; j < PatternSize; ++j) { - if (host[i][j] != value[j]) { - pass = false; - } - } - } - sycl::free(dptr, q); - - if (!pass || verbose) { - printf("Pattern size %3zu bytes, %s values (initial %3u) %s\n", PatternSize, - (SameValue ? " equal" : "varied"), firstValue, - (pass ? "== PASS ==" : "== FAIL ==")); - } - - return !pass; -} - -template int testOneSize(sycl::queue &q) { - return test(q, 0) + test(q, 42); -} - -template -int testSizes(sycl::queue &q, std::index_sequence) { - return (testOneSize<1u + Sizes>(q) + ...); -} - -int main() { - sycl::queue q{}; - int failures = testSizes(q, std::make_index_sequence{}); - if (failures > 0) { - printf("%d / %zu tests failed\n", failures, 2u * MaxPatternSize); - } else { - printf("All %zu tests passed\n", 2u * MaxPatternSize); - } - return failures; -}