File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ void PrintUsage()
7070
7171using Config config = new Config ( modelPath ) ;
7272config . 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}
Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ void PrintUsage()
105105
106106using Config config = new Config ( modelPath ) ;
107107config . 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments