MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LocalTempFilename

Method LocalTempFilename

tensorflow/core/platform/env.cc:352–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352bool Env::LocalTempFilename(string* filename) {
353 std::vector<string> dirs;
354 GetLocalTempDirectories(&dirs);
355
356 // Try each directory, as they might be full, have inappropriate
357 // permissions or have different problems at times.
358 for (const string& dir : dirs) {
359 *filename = io::JoinPath(dir, "tempfile-");
360 if (CreateUniqueFileName(filename, "")) {
361 return true;
362 }
363 }
364 return false;
365}
366
367bool Env::CreateUniqueFileName(string* prefix, const string& suffix) {
368 int32 tid = GetCurrentThreadId();

Callers 5

CompilePtxFunction · 0.80
TESTFunction · 0.80
RunFileCheckFunction · 0.80
TEST_FFunction · 0.80

Calls 1

JoinPathFunction · 0.50

Tested by 4

TESTFunction · 0.64
RunFileCheckFunction · 0.64
TEST_FFunction · 0.64