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

Deprecate plugins config keys #17974

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 10 additions & 7 deletions src/inference/include/openvino/runtime/intel_gpu/ocl/dx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ class D3DBufferTensor : public ClBufferTensor {
*/
static void type_check(const Tensor& tensor) {
RemoteTensor::type_check(tensor,
{{ov::intel_gpu::dev_object_handle.name(), {}},
{ov::intel_gpu::shared_mem_type.name(), {ov::intel_gpu::SharedMemType::DX_BUFFER}}});
{{std::string(ov::intel_gpu::dev_object_handle.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::DX_BUFFER).as<std::string>()}}});
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to wrap with ov::Any?
if it's a WA, can we create a ticket to fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have a map string to vector of strings. So it is why I use any to covert from enum to string.

}

/**
Expand Down Expand Up @@ -75,9 +76,10 @@ class D3DSurface2DTensor : public ClImage2DTensor {
*/
static void type_check(const Tensor& remote_tensor) {
RemoteTensor::type_check(remote_tensor,
{{ov::intel_gpu::dev_object_handle.name(), {}},
{ov::intel_gpu::va_plane.name(), {}},
{ov::intel_gpu::shared_mem_type.name(), {ov::intel_gpu::SharedMemType::VA_SURFACE}}});
{{std::string(ov::intel_gpu::dev_object_handle.name()), {}},
{std::string(ov::intel_gpu::va_plane.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::VA_SURFACE).as<std::string>()}}});
}

/**
Expand Down Expand Up @@ -117,8 +119,9 @@ class D3DContext : public ClContext {
*/
static void type_check(const RemoteContext& remote_context) {
RemoteContext::type_check(remote_context,
{{ov::intel_gpu::va_device.name(), {}},
{ov::intel_gpu::context_type.name(), {ov::intel_gpu::ContextType::VA_SHARED}}});
{{std::string(ov::intel_gpu::va_device.name()), {}},
{std::string(ov::intel_gpu::context_type.name()),
{ov::Any(ov::intel_gpu::ContextType::VA_SHARED).as<std::string>()}}});
}

/**
Expand Down
37 changes: 19 additions & 18 deletions src/inference/include/openvino/runtime/intel_gpu/ocl/ocl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class ClBufferTensor : public RemoteTensor {
* @param tensor a tensor to check
*/
static void type_check(const Tensor& tensor) {
RemoteTensor::type_check(
tensor,
{{ov::intel_gpu::mem_handle.name(), {}},
{ov::intel_gpu::shared_mem_type.name(),
{ov::intel_gpu::SharedMemType::OCL_BUFFER, ov::intel_gpu::SharedMemType::DX_BUFFER}}});
RemoteTensor::type_check(tensor,
{{std::string(ov::intel_gpu::mem_handle.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::OCL_BUFFER).as<std::string>(),
ov::Any(ov::intel_gpu::SharedMemType::DX_BUFFER).as<std::string>()}}});
}

/**
Expand Down Expand Up @@ -100,11 +100,11 @@ class ClImage2DTensor : public RemoteTensor {
* @param tensor a tensor to check
*/
static void type_check(const Tensor& tensor) {
RemoteTensor::type_check(
tensor,
{{ov::intel_gpu::mem_handle.name(), {}},
{ov::intel_gpu::shared_mem_type.name(),
{ov::intel_gpu::SharedMemType::OCL_IMAGE2D, ov::intel_gpu::SharedMemType::VA_SURFACE}}});
RemoteTensor::type_check(tensor,
{{std::string(ov::intel_gpu::mem_handle.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::OCL_IMAGE2D).as<std::string>(),
ov::Any(ov::intel_gpu::SharedMemType::VA_SURFACE).as<std::string>()}}});
}

/**
Expand Down Expand Up @@ -147,11 +147,11 @@ class USMTensor : public RemoteTensor {
*/
static void type_check(const Tensor& tensor) {
RemoteTensor::type_check(tensor,
{{ov::intel_gpu::mem_handle.name(), {}},
{ov::intel_gpu::shared_mem_type.name(),
{ov::intel_gpu::SharedMemType::USM_USER_BUFFER,
ov::intel_gpu::SharedMemType::USM_HOST_BUFFER,
ov::intel_gpu::SharedMemType::USM_DEVICE_BUFFER}}});
{{std::string(ov::intel_gpu::mem_handle.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::USM_USER_BUFFER).as<std::string>(),
ov::Any(ov::intel_gpu::SharedMemType::USM_HOST_BUFFER).as<std::string>(),
ov::Any(ov::intel_gpu::SharedMemType::USM_DEVICE_BUFFER).as<std::string>()}}});
}

/**
Expand Down Expand Up @@ -186,9 +186,10 @@ class ClContext : public RemoteContext {
*/
static void type_check(const RemoteContext& remote_context) {
RemoteContext::type_check(remote_context,
{{ov::intel_gpu::ocl_context.name(), {}},
{ov::intel_gpu::context_type.name(),
{ov::intel_gpu::ContextType::OCL, ov::intel_gpu::ContextType::VA_SHARED}}});
{{std::string(ov::intel_gpu::ocl_context.name()), {}},
{std::string(ov::intel_gpu::context_type.name()),
{ov::Any(ov::intel_gpu::ContextType::OCL).as<std::string>(),
ov::Any(ov::intel_gpu::ContextType::VA_SHARED).as<std::string>()}}});
}

/**
Expand Down
12 changes: 7 additions & 5 deletions src/inference/include/openvino/runtime/intel_gpu/ocl/va.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ class VASurfaceTensor : public ClImage2DTensor {
*/
static void type_check(const Tensor& tensor) {
RemoteTensor::type_check(tensor,
{{ov::intel_gpu::dev_object_handle.name(), {}},
{ov::intel_gpu::va_plane.name(), {}},
{ov::intel_gpu::shared_mem_type.name(), {ov::intel_gpu::SharedMemType::VA_SURFACE}}});
{{std::string(ov::intel_gpu::dev_object_handle.name()), {}},
{std::string(ov::intel_gpu::va_plane.name()), {}},
{std::string(ov::intel_gpu::shared_mem_type.name()),
{ov::Any(ov::intel_gpu::SharedMemType::VA_SURFACE).as<std::string>()}}});
}
/**
* @brief VASurfaceID conversion operator for the VASurfaceTensor object.
Expand Down Expand Up @@ -83,8 +84,9 @@ class VAContext : public ClContext {
*/
static void type_check(const RemoteContext& remote_context) {
RemoteContext::type_check(remote_context,
{{ov::intel_gpu::va_device.name(), {}},
{ov::intel_gpu::context_type.name(), {ov::intel_gpu::ContextType::VA_SHARED}}});
{{std::string(ov::intel_gpu::va_device.name()), {}},
{std::string(ov::intel_gpu::context_type.name()),
{ov::Any(ov::intel_gpu::ContextType::VA_SHARED).as<std::string>()}}});
}

/**
Expand Down