Fix a issue that ort will crash if the model has subgraph created by controlflow ops like loop, if, scan. (#917)
Fix a issue that ort will crash if the model has subgraph created by controlflow ops like loop, if, scan. (#917)

Root cause:
The crash is caused by the null threadpool in the op. The op is inside the subgraph. theadpool is set on the session_state. However it doesn't pass it to the session_sate owned by subgraph.
Fix:
Pass the threadpool to the session_sate owned by subgraph when we create CreateSubgraphSessionState.
microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime