diff --git a/test/conformance/integration/QueueBuffer.cpp b/test/conformance/integration/QueueBuffer.cpp index ff5923c250..d801ebf684 100644 --- a/test/conformance/integration/QueueBuffer.cpp +++ b/test/conformance/integration/QueueBuffer.cpp @@ -72,7 +72,7 @@ TEST_P(QueueBufferTestWithParam, QueueBufferTest) { uint32_t CurValueMem1 = InitialValue; uint32_t CurValueMem2 = InitialValue; - for (int i = 0; i < NumIterations; ++i) { + for (uint32_t i = 0; i < NumIterations; ++i) { /* Copy from DeviceMem1 to DeviceMem2 and multiply by 2 */ ASSERT_SUCCESS( diff --git a/test/conformance/integration/QueueEmptyStatus.cpp b/test/conformance/integration/QueueEmptyStatus.cpp index 84f631c49a..b8f1517b70 100644 --- a/test/conformance/integration/QueueEmptyStatus.cpp +++ b/test/conformance/integration/QueueEmptyStatus.cpp @@ -44,7 +44,7 @@ struct QueueEmptyStatusTestWithParam : uur::IntegrationQueueTestWithParam { constexpr size_t global_offset = 0; constexpr size_t n_dimensions = 1; constexpr uint32_t num_iterations = 5; - for (int i = 0; i < num_iterations; ++i) { + for (uint32_t i = 0; i < num_iterations; ++i) { ASSERT_SUCCESS(urEnqueueKernelLaunch(Queue, kernel, n_dimensions, &global_offset, &ArraySize, nullptr, 0, nullptr, &Event)); @@ -68,7 +68,7 @@ struct QueueEmptyStatusTestWithParam : uur::IntegrationQueueTestWithParam { currentWait += step) { std::this_thread::sleep_for(step); - uint32_t is_queue_empty; + ur_bool_t is_queue_empty; ASSERT_SUCCESS(urQueueGetInfo(Queue, UR_QUEUE_INFO_EMPTY, sizeof(ur_bool_t), &is_queue_empty, nullptr)); @@ -76,6 +76,10 @@ struct QueueEmptyStatusTestWithParam : uur::IntegrationQueueTestWithParam { return; } } + + /* If we are here, the test failed. Let's call queue finish to avoid + * issues when freeing memory */ + ASSERT_SUCCESS(urQueueFinish(Queue)); GTEST_FAIL(); } @@ -97,7 +101,7 @@ TEST_P(QueueEmptyStatusTestWithParam, QueueEmptyStatusTest) { ASSERT_NO_FATAL_FAILURE(waitUntilQueueEmpty()); constexpr size_t expected_value = 3200; - for (int i = 0; i < ArraySize; ++i) { + for (uint32_t i = 0; i < ArraySize; ++i) { ASSERT_EQ(reinterpret_cast(SharedMem)[i], expected_value); } } diff --git a/test/conformance/integration/QueueUSM.cpp b/test/conformance/integration/QueueUSM.cpp index 396cc9535a..cc8201453a 100644 --- a/test/conformance/integration/QueueUSM.cpp +++ b/test/conformance/integration/QueueUSM.cpp @@ -86,7 +86,7 @@ TEST_P(QueueUSMTestWithParam, QueueUSMTest) { std::vector EventsKernel; - for (int i = 0; i < NumIterations; ++i) { + for (uint32_t i = 0; i < NumIterations; ++i) { /* Copy from DeviceMem2 to DeviceMem1 and multiply by 2 */ ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 0, nullptr, &DeviceMem1)); ASSERT_SUCCESS(urKernelSetArgPointer(kernel, 1, nullptr, &DeviceMem2)); diff --git a/test/conformance/integration/fixtures.h b/test/conformance/integration/fixtures.h index db37df7b4c..aca70a5245 100644 --- a/test/conformance/integration/fixtures.h +++ b/test/conformance/integration/fixtures.h @@ -1,3 +1,8 @@ +// Copyright (C) 2024 Intel Corporation +// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. +// See LICENSE.TXT +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #ifndef UR_CONFORMANCE_INTEGRATION_FIXTURES_H #define UR_CONFORMANCE_INTEGRATION_FIXTURES_H @@ -22,7 +27,6 @@ struct IntegrationQueueTestWithParam for (ur_event_handle_t Event : AllEvents) { ASSERT_SUCCESS(urEventRelease(Event)); } - ASSERT_SUCCESS(urQueueRelease(Queue)); UUR_RETURN_ON_FATAL_FAILURE( uur::urKernelExecutionTestWithParam::TearDown()); diff --git a/test/conformance/integration/integration_adapter_hip.match b/test/conformance/integration/integration_adapter_hip.match index e69de29bb2..7016ca68d6 100644 --- a/test/conformance/integration/integration_adapter_hip.match +++ b/test/conformance/integration/integration_adapter_hip.match @@ -0,0 +1,3 @@ +{{OPT}}QueueEmptyStatusTestWithParam.QueueEmptyStatusTest/AMD_HIP_BACKEND___{{.*}}___IN_ORDER_QUEUE +{{OPT}}QueueEmptyStatusTestWithParam.QueueEmptyStatusTest/AMD_HIP_BACKEND___{{.*}}___OUT_OF_ORDER_QUEUE +{{OPT}}{{Segmentation fault|Aborted}} diff --git a/test/conformance/integration/integration_adapter_level_zero.match b/test/conformance/integration/integration_adapter_level_zero.match index e69de29bb2..742b3d1ff1 100644 --- a/test/conformance/integration/integration_adapter_level_zero.match +++ b/test/conformance/integration/integration_adapter_level_zero.match @@ -0,0 +1,3 @@ +QueueEmptyStatusTestWithParam.QueueEmptyStatusTest/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___IN_ORDER_QUEUE +QueueEmptyStatusTestWithParam.QueueEmptyStatusTest/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___OUT_OF_ORDER_QUEUE +