Skip to content

Commit 140a686

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

VSharp.Explorer/AISearcher.fs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,12 @@ 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)
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)
153156
let runOptions = new RunOptions()
154-
let feedback (x:Feedback) = ()
157+
let feedback (x:Feedback) = ()
155158
let predict (gameState:GameState) =
156159
let stateIds = Dictionary<uint<stateId>,int>()
157160
let verticesIds = Dictionary<uint<basicBlockGlobalId>,int>()

0 commit comments

Comments
 (0)