Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tests for v2 command buffer #2670

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/conformance/exp_command_buffer/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,29 @@ struct urCommandBufferCommandsTest
UUR_INSTANTIATE_DEVICE_TEST_SUITE(urCommandBufferCommandsTest);

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMMemcpyExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendUSMMemcpyExp(
cmd_buf_handle, device_ptrs[0], device_ptrs[1], allocation_size, 0,
nullptr, 0, nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMFillExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
uint32_t pattern = 42;
ASSERT_SUCCESS(urCommandBufferAppendUSMFillExp(
cmd_buf_handle, device_ptrs[0], &pattern, sizeof(pattern),
allocation_size, 0, nullptr, 0, nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferCopyExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendMemBufferCopyExp(
cmd_buf_handle, buffers[0], buffers[1], 0, 0, allocation_size, 0, nullptr,
0, nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferCopyRectExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ur_rect_offset_t origin{0, 0, 0};
ur_rect_region_t region{4, 4, 1};
ASSERT_SUCCESS(urCommandBufferAppendMemBufferCopyRectExp(
Expand All @@ -83,13 +87,15 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferCopyRectExp) {
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
std::array<uint32_t, elements> host_data{};
ASSERT_SUCCESS(urCommandBufferAppendMemBufferReadExp(
cmd_buf_handle, buffers[0], 0, allocation_size, host_data.data(), 0,
nullptr, 0, nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadRectExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
std::array<uint32_t, elements> host_data{};
ur_rect_offset_t origin{0, 0, 0};
ur_rect_region_t region{4, 4, 1};
Expand All @@ -99,6 +105,7 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferReadRectExp) {
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferWriteExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
std::array<uint32_t, elements> host_data{};
ASSERT_SUCCESS(urCommandBufferAppendMemBufferWriteExp(
cmd_buf_handle, buffers[0], 0, allocation_size, host_data.data(), 0,
Expand All @@ -107,6 +114,7 @@ TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferWriteExp) {

TEST_P(urCommandBufferCommandsTest,
urCommandBufferAppendMemBufferWriteRectExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
std::array<uint32_t, elements> host_data{};
ur_rect_offset_t origin{0, 0, 0};
ur_rect_region_t region{4, 4, 1};
Expand All @@ -116,19 +124,22 @@ TEST_P(urCommandBufferCommandsTest,
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendMemBufferFillExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
uint32_t pattern = 42;
ASSERT_SUCCESS(urCommandBufferAppendMemBufferFillExp(
cmd_buf_handle, buffers[0], &pattern, sizeof(pattern), 0, allocation_size,
0, nullptr, 0, nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMPrefetchExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendUSMPrefetchExp(
cmd_buf_handle, device_ptrs[0], allocation_size, 0, 0, nullptr, 0,
nullptr, nullptr, nullptr, nullptr));
}

TEST_P(urCommandBufferCommandsTest, urCommandBufferAppendUSMAdviseExp) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendUSMAdviseExp(
cmd_buf_handle, device_ptrs[0], allocation_size, 0, 0, nullptr, 0,
nullptr, nullptr, nullptr, nullptr));
Expand Down
2 changes: 2 additions & 0 deletions test/conformance/exp_command_buffer/fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ UUR_DEVICE_TEST_SUITE_WITH_PARAM(
printFillTestString<urCommandBufferFillCommandsTest>);

TEST_P(urCommandBufferFillCommandsTest, Buffer) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendMemBufferFillExp(
cmd_buf_handle, buffer, pattern.data(), pattern_size, 0, size, 0, nullptr,
0, nullptr, &sync_point, nullptr, nullptr));
Expand All @@ -123,6 +124,7 @@ TEST_P(urCommandBufferFillCommandsTest, Buffer) {
}

TEST_P(urCommandBufferFillCommandsTest, USM) {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});
ASSERT_SUCCESS(urCommandBufferAppendUSMFillExp(
cmd_buf_handle, device_ptr, pattern.data(), pattern_size, size, 0,
nullptr, 0, nullptr, &sync_point, nullptr, nullptr));
Expand Down
10 changes: 0 additions & 10 deletions test/conformance/exp_command_buffer/fixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ static void checkCommandBufferUpdateSupport(

struct urCommandBufferExpTest : uur::urContextTest {
void SetUp() override {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});

UUR_RETURN_ON_FATAL_FAILURE(uur::urContextTest::SetUp());

UUR_RETURN_ON_FATAL_FAILURE(checkCommandBufferSupport(device));
Expand All @@ -78,8 +76,6 @@ struct urCommandBufferExpTest : uur::urContextTest {
template <class T>
struct urCommandBufferExpTestWithParam : urQueueTestWithParam<T> {
void SetUp() override {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});

UUR_RETURN_ON_FATAL_FAILURE(uur::urQueueTestWithParam<T>::SetUp());

UUR_RETURN_ON_FATAL_FAILURE(checkCommandBufferSupport(this->device));
Expand All @@ -100,8 +96,6 @@ struct urCommandBufferExpTestWithParam : urQueueTestWithParam<T> {

struct urCommandBufferExpExecutionTest : uur::urKernelExecutionTest {
void SetUp() override {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});

UUR_RETURN_ON_FATAL_FAILURE(uur::urKernelExecutionTest::SetUp());

UUR_RETURN_ON_FATAL_FAILURE(checkCommandBufferSupport(device));
Expand All @@ -122,8 +116,6 @@ struct urCommandBufferExpExecutionTest : uur::urKernelExecutionTest {

struct urUpdatableCommandBufferExpTest : uur::urQueueTest {
void SetUp() override {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});

UUR_RETURN_ON_FATAL_FAILURE(uur::urQueueTest::SetUp());

UUR_RETURN_ON_FATAL_FAILURE(checkCommandBufferSupport(device));
Expand Down Expand Up @@ -158,8 +150,6 @@ struct urUpdatableCommandBufferExpTest : uur::urQueueTest {

struct urUpdatableCommandBufferExpExecutionTest : uur::urKernelExecutionTest {
void SetUp() override {
UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{});

UUR_RETURN_ON_FATAL_FAILURE(uur::urKernelExecutionTest::SetUp());

ASSERT_SUCCESS(urPlatformGetInfo(platform, UR_PLATFORM_INFO_BACKEND,
Expand Down
1 change: 0 additions & 1 deletion test/conformance/exp_command_buffer/release.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE(urCommandBufferReleaseExpTest);

TEST_P(urCommandBufferReleaseExpTest, Success) {
EXPECT_SUCCESS(urCommandBufferRetainExp(cmd_buf_handle));

uint32_t prev_ref_count = 0;
EXPECT_SUCCESS(uur::GetObjectReferenceCount(cmd_buf_handle, prev_ref_count));

Expand Down
Loading