echuraev opened a new pull request #8244:
URL: https://github.com/apache/tvm/pull/8244
After interrupted tuning session, we may face the problem that the
stream object was released, but we didn't create a new one. In this case
it wasn't possible to run a new Metal task on the device without
restarting rpc application.
Created a global function `metal.ResetGlobalState` which should be
called in RPC application when the connection was closed. In this
function, we reinitialize the streams of Metal devices. And it
guarantees to us that the new RPC session will work with the correct
streams.
Also refactored code of metal_device_api:
- Rename function GetStream -> CastStreamOrGetCurrent
- Add several checks on device id
- When we use `SetStream` with nullptr, then the default stream will be
associated with the device.
Thanks for contributing to TVM! Please refer to guideline
https://tvm.apache.org/docs/contribute/ for useful information and tips. After
the pull request is submitted, please request code reviews from
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
by @ them in the pull request thread.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]