-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dipu,vendor,ascend): simple and thread-safe device management (#746)
* fix(dipu,vendor,ascend): simple and thread-safe device management * refactor: make code more readable by extracting a function * fix: set device id in current_device() goes wrong * refactor and fix a bug for a new thread calling current_device before setDevice * rename process_device_id_thread_cache to g_process_device_id_thread_cache * rename global_device_id to process_device_id --------- Co-authored-by: jfxu-st <xujinfan@sensetime.com>
- Loading branch information
Showing
1 changed file
with
47 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters