Skip to content

Commit a64d1de

Browse files
committed
update tests to 2025.2.0
1 parent bda9e8f commit a64d1de

7 files changed

Lines changed: 59 additions & 32 deletions

File tree

build/00-common.linq

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ static void DotNetRun(string args) => Run("dotnet", args.Dump(), Encoding.GetEnc
2121
static void Run(string exe, string args, Encoding encoding) => Util.Cmd(exe, args, encoding);
2222
static ProjectVersion[] Projects = new[]
2323
{
24-
new ProjectVersion("Sdcb.OpenVINO", "0.7.0-preview.4"),
25-
new ProjectVersion("Sdcb.OpenVINO.Extensions.OpenCvSharp4", "0.7.0-preview.4"),
26-
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR", "0.7.0-preview.4"),
27-
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR.Models.Online", "0.6.2"),
24+
new ProjectVersion("Sdcb.OpenVINO", "0.7.0"),
25+
new ProjectVersion("Sdcb.OpenVINO.Extensions.OpenCvSharp4", "0.7.0"),
26+
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR", "0.7.0"),
27+
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR.Models.Online", "0.7.0"),
2828
};
2929

3030
static async Task DownloadFile(Uri uri, string localFile, CancellationToken cancellationToken = default)

build/02-publish-proget-nuget.linq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void Refresh()
3737
{
3838
string dir = Path.Combine(Path.GetDirectoryName(Util.CurrentQueryPath)!, "nupkgs");
3939
IEnumerable<string> pkgs = Directory.EnumerateFiles(dir, "*.nupkg")
40-
.Where(x => !x.Contains("2024.3.0"))
40+
.Where(x => !x.Contains("2025.1.0"))
4141
;
4242
dc.Content = new
4343
{

generator/Sdcb.OpenVINO.AutoGen/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
IServiceProvider services = ConfigureServices();
1616
//ExtractedInfo info = (await services.GetRequiredService<HeadersDownloader>().DownloadAsync());
1717
AppSettings appSettings = services.GetRequiredService<AppSettings>();
18-
string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.1/windows/openvino_toolkit_windows_2025.1.0.18503.6fec06580ab_x86_64.zip";
18+
string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.2/windows/openvino_toolkit_windows_2025.2.0.19140.c01cd93e24d_x86_64.zip";
1919
ExtractedInfo info = await HeadersDownloader.DirectDownloadAsync(url, services.GetRequiredService<ArtifactDownloader>(), appSettings.DownloadFolder);
2020
ParsedInfo parsed = HeadersParser.Parse(info);
2121
GeneratedAll all = GeneratedAll.Generate(parsed);

projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR.Models.Online/Sdcb.OpenVINO.PaddleOCR.Models.Online.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
</ItemGroup>
4040

4141
<ItemGroup>
42-
<ProjectReference Include="..\Sdcb.OpenVINO.PaddleOCR\Sdcb.OpenVINO.PaddleOCR.csproj" Condition="'$(Configuration)' == 'Debug'" />
43-
<PackageReference Include="Sdcb.OpenVINO.PaddleOCR" Version="0.6.2" Condition="'$(Configuration)' != 'Debug'" />
42+
<ProjectReference Include="..\Sdcb.OpenVINO.PaddleOCR\Sdcb.OpenVINO.PaddleOCR.csproj" />
4443
</ItemGroup>
4544

4645
</Project>

projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR.Tests/Sdcb.OpenVINO.PaddleOCR.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
19-
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.11.0.20250507" />
20-
<PackageReference Include="Sdcb.OpenVINO.runtime.ubuntu.22.04-x64" Version="2025.0.0" />
21-
<PackageReference Include="Sdcb.OpenVINO.runtime.win-x64" Version="2025.0.0" />
19+
<PackageReference Include="Sdcb.OpenCvSharp4.mini.runtime.linux-x64" Version="4.11.0.34" />
20+
<PackageReference Include="Sdcb.OpenCvSharp4.mini.runtime.win-x64" Version="4.11.0.34" />
21+
<PackageReference Include="Sdcb.OpenVINO.runtime.ubuntu.22.04-x64" Version="2025.2.0" />
22+
<PackageReference Include="Sdcb.OpenVINO.runtime.win-x64" Version="2025.2.0" />
2223
<PackageReference Include="xunit" Version="2.9.3" />
2324
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
2425
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Sdcb.OpenVINO/Natives/NativeMethods.g.cs

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ public static unsafe partial class NativeMethods
328328
[DllImport(Dll, EntryPoint = nameof(ov_core_compile_model_from_file), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_compile_model_from_file(ov_core* core, byte* model_path, byte* device_name, nint property_args_size, ov_compiled_model** compiled_model, IntPtr varg1, IntPtr varg2, IntPtr varg3, IntPtr varg4, IntPtr varg5, IntPtr varg6, IntPtr varg7, IntPtr varg8, IntPtr varg9, IntPtr varg10, IntPtr varg11, IntPtr varg12, IntPtr varg13, IntPtr varg14, IntPtr varg15, IntPtr varg16, IntPtr varg17, IntPtr varg18, IntPtr varg19, IntPtr varg20);
329329

330330

331+
/// <summary>Adds an extension to the core.</summary>
332+
/// <param name="core">A pointer to the ov_core_t instance.</param>
333+
/// <param name="path">Path to the extension.</param>
334+
/// <returns>Status code of the operation: OK(0) for success.</returns>
335+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 247, 248, "ov_core_c_api")]
336+
public static extern ov_status_e ov_core_add_extension(ov_core* core, byte* path);
337+
338+
331339
/// <summary>
332340
/// <para>Reads a model and creates a compiled model from the IR/ONNX/PDPD file.</para>
333341
/// <para>This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,</para>
@@ -343,7 +351,7 @@ public static unsafe partial class NativeMethods
343351
/// <para>for this load operation operation. Supported property key please see ov_property.h.</para>
344352
/// </remarks>
345353
/// <returns>Status code of the operation: OK(0) for success.</returns>
346-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 255, 261, "ov_core_c_api")]
354+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 265, 271, "ov_core_c_api")]
347355
public static extern ov_status_e ov_core_compile_model_from_file_unicode(ov_core* core, int* model_path, byte* device_name, nint property_args_size, ov_compiled_model** compiled_model);
348356
[DllImport(Dll, EntryPoint = nameof(ov_core_compile_model_from_file_unicode), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_compile_model_from_file_unicode(ov_core* core, int* model_path, byte* device_name, nint property_args_size, ov_compiled_model** compiled_model, IntPtr varg1, IntPtr varg2);
349357
[DllImport(Dll, EntryPoint = nameof(ov_core_compile_model_from_file_unicode), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_compile_model_from_file_unicode(ov_core* core, int* model_path, byte* device_name, nint property_args_size, ov_compiled_model** compiled_model, IntPtr varg1, IntPtr varg2, IntPtr varg3, IntPtr varg4);
@@ -365,7 +373,7 @@ public static unsafe partial class NativeMethods
365373
/// <para>Supported property key please see ov_property.h.</para>
366374
/// </remarks>
367375
/// <returns>Status code of the operation: OK(0) for success.</returns>
368-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 274, 275, "ov_core_c_api")]
376+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 284, 285, "ov_core_c_api")]
369377
public static extern ov_status_e ov_core_set_property(ov_core* core, byte* device_name);
370378
[DllImport(Dll, EntryPoint = nameof(ov_core_set_property), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_set_property(ov_core* core, byte* device_name, IntPtr varg1, IntPtr varg2);
371379
[DllImport(Dll, EntryPoint = nameof(ov_core_set_property), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_set_property(ov_core* core, byte* device_name, IntPtr varg1, IntPtr varg2, IntPtr varg3, IntPtr varg4);
@@ -388,7 +396,7 @@ public static unsafe partial class NativeMethods
388396
/// <param name="property_key"> Property key.</param>
389397
/// <param name="property_value">A pointer to property value with string format.</param>
390398
/// <returns>Status code of the operation: OK(0) for success.</returns>
391-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 287, 288, "ov_core_c_api")]
399+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 297, 298, "ov_core_c_api")]
392400
public static extern ov_status_e ov_core_get_property(ov_core* core, byte* device_name, byte* property_key, byte** property_value);
393401

394402

@@ -399,14 +407,14 @@ public static unsafe partial class NativeMethods
399407
/// <para>Core objects go over all registered plugins and ask about available devices.</para>
400408
/// </param>
401409
/// <returns>Status code of the operation: OK(0) for success.</returns>
402-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 298, 299, "ov_core_c_api")]
410+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 308, 309, "ov_core_c_api")]
403411
public static extern ov_status_e ov_core_get_available_devices(ov_core* core, ov_available_devices_t* devices);
404412

405413

406414
/// <summary>Releases memory occpuied by ov_available_devices_t</summary>
407415
/// <param name="devices">A pointer to the ov_available_devices_t instance.</param>
408416
/// <returns>Status code of the operation: OK(0) for success.</returns>
409-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 307, 308, "ov_core_c_api")]
417+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 317, 318, "ov_core_c_api")]
410418
public static extern void ov_available_devices_free(ov_available_devices_t* devices);
411419

412420

@@ -417,7 +425,7 @@ public static unsafe partial class NativeMethods
417425
/// <param name="device_name">Name of a device to import a compiled model for.</param>
418426
/// <param name="compiled_model">A pointer to the newly created compiled_model.</param>
419427
/// <returns>Status code of the operation: OK(0) for success.</returns>
420-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 320, 325, "ov_core_c_api")]
428+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 330, 335, "ov_core_c_api")]
421429
public static extern ov_status_e ov_core_import_model(ov_core* core, byte* content, nint content_size, byte* device_name, ov_compiled_model** compiled_model);
422430

423431

@@ -430,13 +438,13 @@ public static unsafe partial class NativeMethods
430438
/// <param name="device_name">Device name to identify a plugin.</param>
431439
/// <param name="versions">A pointer to versions corresponding to device_name.</param>
432440
/// <returns>Status code of the operation: OK(0) for success.</returns>
433-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 337, 338, "ov_core_c_api")]
441+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 347, 348, "ov_core_c_api")]
434442
public static extern ov_status_e ov_core_get_versions_by_device_name(ov_core* core, byte* device_name, ov_core_version_list_t* versions);
435443

436444

437445
/// <summary>Releases memory occupied by ov_core_version_list_t.</summary>
438446
/// <param name="versions">A pointer to the ov_core_version_list_t to free memory.</param>
439-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 345, 346, "ov_core_c_api")]
447+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 355, 356, "ov_core_c_api")]
440448
public static extern void ov_core_versions_free(ov_core_version_list_t* versions);
441449

442450

@@ -450,7 +458,7 @@ public static unsafe partial class NativeMethods
450458
/// <param name="context">A pointer to the newly created remote context.</param>
451459
/// <remarks>variadic parmameters Actual context property parameter for remote context</remarks>
452460
/// <returns>Status code of the operation: OK(0) for success.</returns>
453-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 359, 364, "ov_core_c_api")]
461+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 369, 374, "ov_core_c_api")]
454462
public static extern ov_status_e ov_core_create_context(ov_core* core, byte* device_name, nint context_args_size, ov_remote_context** context);
455463
[DllImport(Dll, EntryPoint = nameof(ov_core_create_context), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_create_context(ov_core* core, byte* device_name, nint context_args_size, ov_remote_context** context, IntPtr varg1, IntPtr varg2);
456464
[DllImport(Dll, EntryPoint = nameof(ov_core_create_context), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_create_context(ov_core* core, byte* device_name, nint context_args_size, ov_remote_context** context, IntPtr varg1, IntPtr varg2, IntPtr varg3, IntPtr varg4);
@@ -472,7 +480,7 @@ public static unsafe partial class NativeMethods
472480
/// <param name="compiled_model">A pointer to the newly created compiled_model.</param>
473481
/// <remarks>variadic parmameters Actual property parameter for remote context</remarks>
474482
/// <returns>Status code of the operation: OK(0) for success.</returns>
475-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 377, 383, "ov_core_c_api")]
483+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 387, 393, "ov_core_c_api")]
476484
public static extern ov_status_e ov_core_compile_model_with_context(ov_core* core, ov_model* model, ov_remote_context* context, nint property_args_size, ov_compiled_model** compiled_model);
477485
[DllImport(Dll, EntryPoint = nameof(ov_core_compile_model_with_context), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_compile_model_with_context(ov_core* core, ov_model* model, ov_remote_context* context, nint property_args_size, ov_compiled_model** compiled_model, IntPtr varg1, IntPtr varg2);
478486
[DllImport(Dll, EntryPoint = nameof(ov_core_compile_model_with_context), CallingConvention = CallingConvention.Cdecl)] public static extern ov_status_e ov_core_compile_model_with_context(ov_core* core, ov_model* model, ov_remote_context* context, nint property_args_size, ov_compiled_model** compiled_model, IntPtr varg1, IntPtr varg2, IntPtr varg3, IntPtr varg4);
@@ -491,15 +499,15 @@ public static unsafe partial class NativeMethods
491499
/// <param name="device_name">Name of a device to get a default shared context from.</param>
492500
/// <param name="context">A pointer to the referenced remote context.</param>
493501
/// <returns>Status code of the operation: OK(0) for success.</returns>
494-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 393, 394, "ov_core_c_api")]
502+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 403, 404, "ov_core_c_api")]
495503
public static extern ov_status_e ov_core_get_default_context(ov_core* core, byte* device_name, ov_remote_context** context);
496504

497505

498506
/// <summary>
499507
/// <para>Shut down the OpenVINO by deleting all static-duration objects allocated by the library and releasing</para>
500508
/// <para>dependent resources</para>
501509
/// </summary>
502-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 405, 405, "ov_c_api")]
510+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_core.h", 415, 415, "ov_c_api")]
503511
public static extern void ov_shutdown();
504512

505513

@@ -1523,48 +1531,66 @@ public static unsafe partial class NativeMethods
15231531
public static extern ov_status_e ov_tensor_set_shape(ov_tensor* tensor, ov_shape_t shape);
15241532

15251533

1534+
/// <summary>Constructs a new tensor using a string array.</summary>
1535+
/// <param name="string_array">An array of strings</param>
1536+
/// <param name="array_size">The size of the string array</param>
1537+
/// <param name="shape">Tensor shape</param>
1538+
/// <param name="tensor">A point to ov_tensor_t</param>
1539+
/// <returns>Status code of the operation: OK(0) for success.</returns>
1540+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 69, 73, "ov_tensor_c_api")]
1541+
public static extern ov_status_e ov_tensor_create_from_string_array(byte** string_array, nint array_size, ov_shape_t shape, ov_tensor** tensor);
1542+
1543+
15261544
/// <summary>Get shape for tensor.</summary>
15271545
/// <param name="tensor">Tensor shape</param>
15281546
/// <param name="shape">A point to ov_tensor_t</param>
15291547
/// <returns>Status code of the operation: OK(0) for success.</returns>
1530-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 67, 68, "ov_tensor_c_api")]
1548+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 82, 83, "ov_tensor_c_api")]
15311549
public static extern ov_status_e ov_tensor_get_shape(ov_tensor* tensor, ov_shape_t* shape);
15321550

15331551

15341552
/// <summary>Get type for tensor.</summary>
15351553
/// <param name="tensor">Tensor element type</param>
15361554
/// <param name="type">A point to ov_tensor_t</param>
15371555
/// <returns>Status code of the operation: OK(0) for success.</returns>
1538-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 77, 78, "ov_tensor_c_api")]
1556+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 92, 93, "ov_tensor_c_api")]
15391557
public static extern ov_status_e ov_tensor_get_element_type(ov_tensor* tensor, ov_element_type_e* type);
15401558

15411559

1560+
/// <summary>Set string data for tensor</summary>
1561+
/// <param name="tensor">Array of strings</param>
1562+
/// <param name="string_array">Size of the array</param>
1563+
/// <param name="array_size">A point to ov_tensor_t</param>
1564+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 102, 103, "ov_tensor_c_api")]
1565+
public static extern ov_status_e ov_tensor_set_string_data(ov_tensor* tensor, byte** string_array, nint array_size);
1566+
1567+
15421568
/// <summary>the total number of elements (a product of all the dims or 1 for scalar).</summary>
15431569
/// <param name="tensor">number of elements</param>
15441570
/// <param name="elements_size">A point to ov_tensor_t</param>
15451571
/// <returns>Status code of the operation: OK(0) for success.</returns>
1546-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 87, 88, "ov_tensor_c_api")]
1572+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 112, 113, "ov_tensor_c_api")]
15471573
public static extern ov_status_e ov_tensor_get_size(ov_tensor* tensor, nint* elements_size);
15481574

15491575

15501576
/// <summary>the size of the current Tensor in bytes.</summary>
15511577
/// <param name="tensor">the size of the current Tensor in bytes.</param>
15521578
/// <param name="byte_size">A point to ov_tensor_t</param>
15531579
/// <returns>Status code of the operation: OK(0) for success.</returns>
1554-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 97, 98, "ov_tensor_c_api")]
1580+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 122, 123, "ov_tensor_c_api")]
15551581
public static extern ov_status_e ov_tensor_get_byte_size(ov_tensor* tensor, nint* byte_size);
15561582

15571583

15581584
/// <summary>Provides an access to the underlaying host memory.</summary>
15591585
/// <param name="tensor">A point to host memory.</param>
15601586
/// <param name="data">A point to ov_tensor_t</param>
15611587
/// <returns>Status code of the operation: OK(0) for success.</returns>
1562-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 107, 108, "ov_tensor_c_api")]
1588+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 132, 133, "ov_tensor_c_api")]
15631589
public static extern ov_status_e ov_tensor_data(ov_tensor* tensor, void** data);
15641590

15651591

15661592
/// <summary>Free ov_tensor_t.</summary>
15671593
/// <param name="tensor">A point to ov_tensor_t</param>
1568-
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 115, 116, "ov_tensor_c_api")]
1594+
[DllImport(Dll, CallingConvention = CallingConvention.Cdecl), CSourceInfo("ov_tensor.h", 140, 141, "ov_tensor_c_api")]
15691595
public static extern void ov_tensor_free(ov_tensor* tensor);
15701596
}

0 commit comments

Comments
 (0)