kineto
kineto copied to clipboard
Don't call `getenv` in side threads
Calling getenv
on side threads is dangerous as it can potentially segfault if the main thread is in the middle of setting environment variables: https://github.com/pytorch/pytorch/issues/134596
This PR only calls getenv
on init
rather than in Config()
which can be called from multiple threads.
CC @malfet @nWEIdia @ptrblck @tinglvv