add get openvino available ops function
This commit is contained in:
parent
77d68146a8
commit
ee31dc1c1b
|
|
@ -458,6 +458,17 @@ static ggml_backend_buffer_t ggml_backend_openvino_device_buffer_from_host_ptr(g
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::set<std::string> get_openvino_available_opsets() {
|
||||||
|
ov::Core core;
|
||||||
|
std::set<std::string> unique_ops;
|
||||||
|
for (const auto& opset : ov::get_available_opsets()) {
|
||||||
|
for (const auto& op : opset.second().get_type_info_set()) {
|
||||||
|
unique_ops.insert(op.name).second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return unique_ops;
|
||||||
|
}
|
||||||
|
|
||||||
static bool ggml_backend_openvino_device_supports_op(ggml_backend_dev_t dev, const ggml_tensor * op) {
|
static bool ggml_backend_openvino_device_supports_op(ggml_backend_dev_t dev, const ggml_tensor * op) {
|
||||||
GGML_ASSERT(dev->reg != nullptr);
|
GGML_ASSERT(dev->reg != nullptr);
|
||||||
// ggml_backend_openvino_device_context * dev_ctx = (ggml_backend_openvino_device_context *) dev->context;
|
// ggml_backend_openvino_device_context * dev_ctx = (ggml_backend_openvino_device_context *) dev->context;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue