Skip to content

Commit

Permalink
Fix most or possibly all match file issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongreig committed Sep 19, 2024
1 parent c4bc178 commit 29976f1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ etors:
- name: VENDOR_ID
desc: "[uint32_t] vendor Id of the device"
- name: DEVICE_ID
desc: "[uint32_t] Id of the device"
desc: "[uint32_t][optional-query] Id of the device"
- name: MAX_COMPUTE_UNITS
desc: "[uint32_t] the number of compute units"
- name: MAX_WORK_ITEM_DIMENSIONS
Expand Down
1 change: 1 addition & 0 deletions test/conformance/device/device_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{NONDETERMINISTIC}}
urDeviceCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle
{{OPT}}urDeviceGetGlobalTimestampTest.SuccessSynchronizedTime
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_READ_WRITE_IMAGE_ARGS
3 changes: 3 additions & 0 deletions test/conformance/device/device_adapter_native_cpu.match
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_WORK_GROUPS_3D
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ASYNC_BARRIER
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_HOST_PIPE_READ_WRITE_SUPPORTED
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_IP_VERSION
urDeviceGetInfoTest.Success/UR_DEVICE_INFO_KERNEL_SET_SPECIALIZATION_CONSTANTS
1 change: 0 additions & 1 deletion test/conformance/kernel/kernel_adapter_opencl.match
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{NONDETERMINISTIC}}
urKernelGetInfoTest.Success/Intel_R__OpenCL_{{.*}}_UR_KERNEL_INFO_NUM_REGS
2 changes: 0 additions & 2 deletions test/conformance/program/program_adapter_cuda.match
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ urProgramBuildTest.BuildFailure/NVIDIA_CUDA_BACKEND___{{.*}}_
# This test flakily fails
{{OPT}}urProgramGetBuildInfoSingleTest.LogIsNullTerminated/NVIDIA_CUDA_BACKEND___{{.*}}
# CUDA doesn't expose kernel numbers or names
urProgramGetInfoTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_NUM_KERNELS
urProgramGetInfoTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_KERNEL_NAMES
{{OPT}}urProgramSetSpecializationConstantsTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}
{{OPT}}urProgramSetSpecializationConstantsTest.UseDefaultValue/NVIDIA_CUDA_BACKEND___{{.*}}
urProgramSetMultipleSpecializationConstantsTest.MultipleCalls/NVIDIA_CUDA_BACKEND___{{.*}}
Expand Down
19 changes: 9 additions & 10 deletions test/conformance/usm/urUSMGetMemAllocInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
// See LICENSE.TXT
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <map>
#include <uur/fixtures.h>

struct urUSMAllocInfoTest
struct urUSMGetMemAllocInfoTest
: uur::urUSMDeviceAllocTestWithParam<ur_usm_alloc_info_t> {
void SetUp() override {
use_pool = getParam() == UR_USM_ALLOC_INFO_POOL;
Expand All @@ -15,7 +14,7 @@ struct urUSMAllocInfoTest
}
};

UUR_TEST_SUITE_P(urUSMAllocInfoTest,
UUR_TEST_SUITE_P(urUSMGetMemAllocInfoTest,
::testing::Values(UR_USM_ALLOC_INFO_TYPE,
UR_USM_ALLOC_INFO_BASE_PTR,
UR_USM_ALLOC_INFO_SIZE,
Expand All @@ -31,7 +30,7 @@ static std::unordered_map<ur_usm_alloc_info_t, size_t> usm_info_size_map = {
{UR_USM_ALLOC_INFO_POOL, sizeof(ur_usm_pool_handle_t)},
};

TEST_P(urUSMAllocInfoTest, Success) {
TEST_P(urUSMGetMemAllocInfoTest, Success) {
size_t size = 0;
auto alloc_info = getParam();
ASSERT_QUERY_SUCCESS(
Expand Down Expand Up @@ -81,34 +80,34 @@ TEST_P(urUSMAllocInfoTest, Success) {
}
}

using urUSMGetMemAllocInfoTest = uur::urUSMDeviceAllocTest;
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urUSMGetMemAllocInfoTest);
using urUSMGetMemAllocInfoNegativeTest = uur::urUSMDeviceAllocTest;
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urUSMGetMemAllocInfoNegativeTest);

TEST_P(urUSMGetMemAllocInfoTest, InvalidNullHandleContext) {
TEST_P(urUSMGetMemAllocInfoNegativeTest, InvalidNullHandleContext) {
ur_usm_type_t USMType;
ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_HANDLE,
urUSMGetMemAllocInfo(nullptr, ptr, UR_USM_ALLOC_INFO_TYPE,
sizeof(ur_usm_type_t), &USMType,
nullptr));
}

TEST_P(urUSMGetMemAllocInfoTest, InvalidNullPointerMem) {
TEST_P(urUSMGetMemAllocInfoNegativeTest, InvalidNullPointerMem) {
ur_usm_type_t USMType;
ASSERT_EQ_RESULT(
UR_RESULT_ERROR_INVALID_NULL_POINTER,
urUSMGetMemAllocInfo(context, nullptr, UR_USM_ALLOC_INFO_TYPE,
sizeof(ur_usm_type_t), &USMType, nullptr));
}

TEST_P(urUSMGetMemAllocInfoTest, InvalidEnumeration) {
TEST_P(urUSMGetMemAllocInfoNegativeTest, InvalidEnumeration) {
ur_usm_type_t USMType;
ASSERT_EQ_RESULT(
UR_RESULT_ERROR_INVALID_ENUMERATION,
urUSMGetMemAllocInfo(context, ptr, UR_USM_ALLOC_INFO_FORCE_UINT32,
sizeof(ur_usm_type_t), &USMType, nullptr));
}

TEST_P(urUSMGetMemAllocInfoTest, InvalidValuePropSize) {
TEST_P(urUSMGetMemAllocInfoNegativeTest, InvalidValuePropSize) {
ur_usm_type_t USMType;
ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_SIZE,
urUSMGetMemAllocInfo(context, ptr, UR_USM_ALLOC_INFO_TYPE,
Expand Down

0 comments on commit 29976f1

Please sign in to comment.