I want to have 2 evaluates running parallelly on 2 different devices(and 2 different sessions) that I have created, for which I am using EvaluateAsync()
Code:
std::cout<<" Starting Evaluate " << std::endl;
auto start = high_resolution_clock::now();
auto eval_1= session.EvaluateAsync(binding, L""();
auto eval_2 = session_2.EvaluateAsync( binding_2, L"" )
auto stop = high_resolution_clock::now();
auto duration = duration_cast<microseconds>( stop - start );
std::cout << " Ending Evaluate " << duration.count() << std::endl;
Expected behavior:
With only one evaluate call (let's assume only auto eval_1= session.EvaluateAsync(binding, L""(); between time recorded), I know duration is 10 ms.
If the EvaluateAsyn is truly asynchronous I expect with 2 calls, the time should be max of the 2 calls, however, it takes double the time ie 20 ms to execute.