From a78ffbc85531c41e1758df46a8f0e651a355a2b6 Mon Sep 17 00:00:00 2001 From: Tomasz Biernacik Date: Mon, 10 Feb 2025 12:52:01 +0000 Subject: [PATCH] test: improve reliability Related-To: NEO-12650 Signed-off-by: Tomasz Biernacik --- .../core/test/black_box_tests/common/zello_common.h | 2 ++ .../core/test/black_box_tests/zello_copy_only.cpp | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/level_zero/core/test/black_box_tests/common/zello_common.h b/level_zero/core/test/black_box_tests/common/zello_common.h index 98b7bac503..decc3ef40c 100644 --- a/level_zero/core/test/black_box_tests/common/zello_common.h +++ b/level_zero/core/test/black_box_tests/common/zello_common.h @@ -90,6 +90,8 @@ void printResult(bool aubMode, bool outputValidationSuccessful, const std::strin void printResult(bool aubMode, bool outputValidationSuccessful, const std::string &blackBoxName); +std::vector &getDeviceQueueProperties(ze_device_handle_t device); + uint32_t getCommandQueueOrdinal(ze_device_handle_t &device, bool useCooperativeFlag); std::vector getComputeQueueOrdinals(ze_device_handle_t &device); diff --git a/level_zero/core/test/black_box_tests/zello_copy_only.cpp b/level_zero/core/test/black_box_tests/zello_copy_only.cpp index 570362a96f..b1afebfc85 100644 --- a/level_zero/core/test/black_box_tests/zello_copy_only.cpp +++ b/level_zero/core/test/black_box_tests/zello_copy_only.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -238,7 +238,7 @@ void testRegionCopyOf2DSharedMem(ze_context_handle_t &context, ze_device_handle_ } } - int value = 0; + uint8_t value = 0; SUCCESS_OR_TERMINATE(zeCommandListAppendMemoryFill(cmdList, dstBuffer, reinterpret_cast(&value), sizeof(value), dstSize, nullptr, 0, nullptr)); @@ -308,6 +308,12 @@ void testSharedMemDataAccessWithoutCopy(ze_context_handle_t &context, ze_device_ return; } + if (LevelZeroBlackBoxTests::getDeviceQueueProperties(device).at(copyQueueGroup).maxMemoryFillPatternSize < pattern1Size) { + std::cout << "testSharedMemDataAccessWithoutCopy case not supported. Skipping test run\n"; + validRet = true; + return; + } + cmdQueueDesc.pNext = nullptr; cmdQueueDesc.flags = 0; cmdQueueDesc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS; @@ -487,7 +493,7 @@ void testRegionCopyOf3DSharedMem(ze_context_handle_t &context, ze_device_handle_ } } - int value = 0; + uint8_t value = 0; SUCCESS_OR_TERMINATE(zeCommandListAppendMemoryFill(cmdList, dstBuffer, reinterpret_cast(&value), sizeof(value), dstSize, nullptr, 0, nullptr));