forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libtpu] Make copies of data returned by getenv.
According to http://www.cplusplus.com/reference/cstdlib/getenv/: The pointer returned points to an internal memory block, whose content or validity may be altered by further calls to getenv (but not by other library functions). This appears to have been working without the defensive copies, but we should follow the spec just in case. This change also refactors TfTpu_Initialize to not use the argc/argv convention for simplicity (the implementation doesn't actually require a nullptr at the end of argv). PiperOrigin-RevId: 354396268 Change-Id: Ie14f13d4a67e1012dc13af63df6a9a4fcb22feeb
- Loading branch information
1 parent
d0e6a3b
commit 8bc0c84
Showing
5 changed files
with
25 additions
and
20 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
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
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
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
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