Skip to content

Commit ce150a8

Browse files
committed
Enable parallelization in AI searcher.
1 parent dc97fc9 commit ce150a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

VSharp.Explorer/AISearcher.fs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ type internal AISearcher(oracle: Oracle, aiAgentTrainingOptions: Option<AIAgentT
149149
let numOfStateAttributes = 7
150150
let numOfHistoryEdgeAttributes = 2
151151
let createOracle (pathToONNX: string) =
152-
let session = new InferenceSession(pathToONNX)
153-
let runOptions = new RunOptions()
152+
let sessionOptions = new SessionOptions()
153+
sessionOptions.ExecutionMode <- ExecutionMode.ORT_PARALLEL
154+
sessionOptions.GraphOptimizationLevel <- GraphOptimizationLevel.ORT_ENABLE_ALL
155+
let session = new InferenceSession(pathToONNX, sessionOptions)
154156
let feedback (x:Feedback) = ()
155157
let predict (gameState:GameState) =
156158
let stateIds = Dictionary<uint<stateId>,int>()

0 commit comments

Comments
 (0)