Skip to content

Commit 06167c7

Browse files
committed
various fixes
1 parent 8d27282 commit 06167c7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

examples/csharp/HelloPhi/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ void PrintUsage()
7070

7171
using Config config = new Config(modelPath);
7272
config.ClearProviders();
73-
if (!config.equals("cpu")) {
73+
if (executionProvider != "cpu") {
7474
config.AppendProvider(executionProvider);
75-
if (executionProvider.equals("cuda")) {
75+
if (executionProvider == "cuda") {
7676
config.SetProviderOption(executionProvider, "enable_cuda_graph", "0");
7777
}
7878
}

examples/csharp/HelloPhi3V/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ void PrintUsage()
105105

106106
using Config config = new Config(modelPath);
107107
config.ClearProviders();
108-
if (!config.equals("cpu")) {
108+
if (executionProvider != "cpu") {
109109
config.AppendProvider(executionProvider);
110-
if (executionProvider.equals("cuda")) {
110+
if (executionProvider == "cuda") {
111111
config.SetProviderOption(executionProvider, "enable_cuda_graph", "0");
112112
}
113113
}

examples/python/phi3v.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def run(args: argparse.Namespace):
3030
print("Loading model...")
3131
config = og.Config(args.model_path)
3232
config.clear_providers()
33-
if args.provider != "cpu":
34-
print(f"Setting model to {args.provider}...")
35-
config.append_provider(args.provider)
33+
if args.execution_provider != "cpu":
34+
print(f"Setting model to {args.execution_provider}...")
35+
config.append_provider(args.execution_provider)
3636
model = og.Model(config)
3737
print("Model loaded")
3838

0 commit comments

Comments
 (0)