Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit b1f15f1

Browse files
committed
Add OpenVino EP support to core
1 parent 0b9a01e commit b1f15f1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

OnnxStack.Core/Config/ExecutionProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public enum ExecutionProvider
55
DirectML = 0,
66
Cuda = 1,
77
Cpu = 2,
8-
CoreML = 3
8+
CoreML = 3,
9+
OpenVino = 4
910
}
1011
}

OnnxStack.Core/Extensions/Extensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public static SessionOptions GetSessionOptions(this OnnxModelConfig configuratio
3636
sessionOptions.AppendExecutionProvider_CPU();
3737
return sessionOptions;
3838
case ExecutionProvider.CoreML:
39-
sessionOptions.AppendExecutionProvider_CoreML(
40-
CoreMLFlags.COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE
41-
);
39+
sessionOptions.AppendExecutionProvider_CoreML(CoreMLFlags.COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE);
40+
return sessionOptions;
41+
case ExecutionProvider.OpenVino:
42+
//TODO: DeviceId = "CPU_FP32"|"GPU_FP32"|"GPU_FP16"|"MYRIAD_FP16"|"VAD-M_FP16"|"VAD-F_FP32"
43+
sessionOptions.AppendExecutionProvider_OpenVINO();
4244
return sessionOptions;
4345
}
4446
}

0 commit comments

Comments
 (0)