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

[UR] Device CTS fixes #652

Merged
merged 1 commit into from
Jun 26, 2023
Merged
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
2 changes: 1 addition & 1 deletion test/conformance/device/urDeviceGet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ TEST_F(urDeviceGetTest, InvalidValueNumEntries) {
ASSERT_NE(count, 0);
std::vector<ur_device_handle_t> devices(count);
ASSERT_EQ_RESULT(
UR_RESULT_ERROR_INVALID_VALUE,
UR_RESULT_ERROR_INVALID_SIZE,
urDeviceGet(platform, UR_DEVICE_TYPE_ALL, 0, devices.data(), nullptr));
}
3 changes: 1 addition & 2 deletions test/conformance/device/urDeviceGetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ static std::unordered_map<ur_device_info_t, size_t> device_info_size_map = {
{UR_DEVICE_INFO_MAX_COMPUTE_UNITS, sizeof(uint32_t)},
{UR_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, sizeof(uint32_t)},
{UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, sizeof(size_t)},
{UR_DEVICE_INFO_MAX_WORK_GROUP_SIZE, sizeof(size_t)},
{UR_DEVICE_INFO_SINGLE_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)},
{UR_DEVICE_INFO_HALF_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)},
{UR_DEVICE_INFO_DOUBLE_FP_CONFIG, sizeof(ur_device_fp_capability_flags_t)},
Expand Down Expand Up @@ -258,7 +257,7 @@ TEST_P(urDeviceGetInfoTest, Success) {
ASSERT_SUCCESS(urDeviceGetInfo(device, info_type, size,
info_data.data(), nullptr));
} else {
ASSERT_EQ_RESULT(result, UR_RESULT_ERROR_INVALID_ENUMERATION);
ASSERT_EQ_RESULT(result, UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION);
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions test/conformance/device/urDeviceRelease.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ TEST_F(urDeviceReleaseTest, Success) {

TEST_F(urDeviceReleaseTest, SuccessSubdevices) {
for (auto device : devices) {
if (!uur::hasDevicePartitionSupport(device,
UR_DEVICE_PARTITION_EQUALLY)) {
::testing::Message() << "Device: \'" << device
<< "\' does not support partitioning equally.";
continue;
}

ur_device_partition_property_t prop = uur::makePartitionEquallyDesc(1);

Expand Down
6 changes: 6 additions & 0 deletions test/conformance/device/urDeviceRetain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ TEST_F(urDeviceRetainTest, Success) {

TEST_F(urDeviceRetainTest, SuccessSubdevices) {
for (auto device : devices) {
if (!uur::hasDevicePartitionSupport(device,
UR_DEVICE_PARTITION_EQUALLY)) {
::testing::Message() << "Device: \'" << device
<< "\' does not support partitioning equally.";
continue;
}

ur_device_partition_property_t prop = uur::makePartitionEquallyDesc(1);
ur_device_partition_properties_t properties{
Expand Down
2 changes: 1 addition & 1 deletion test/conformance/device/urDeviceSelectBinary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TEST_F(urDeviceSelectBinaryTest, InvalidValueNumBinaries) {
for (auto device : devices) {
uint32_t selected_binary;
ASSERT_EQ_RESULT(
UR_RESULT_ERROR_INVALID_VALUE,
UR_RESULT_ERROR_INVALID_SIZE,
urDeviceSelectBinary(device, binaries, 0, &selected_binary));
}
}