/third_party/mindspore/mindspore/lite/src/common/ |
D | file_utils.cc | 41 inline int AccessFile(const std::string &file_path, int access_mode) { in AccessFile() argument 43 return _access(file_path.c_str(), access_mode); in AccessFile() 47 if (stat(file_path.c_str(), &st) == 0) { in AccessFile() 50 return (can_read && access(file_path.c_str(), access_mode) == 0) ? 0 : -1; in AccessFile() 56 inline int Mkdir(const std::string &file_path) { in Mkdir() argument 58 return _mkdir(file_path.c_str()); in Mkdir() 60 return mkdir(file_path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); in Mkdir() 130 int CreateOutputDir(std::string *file_path) { in CreateOutputDir() argument 131 if (file_path->empty()) { in CreateOutputDir() 134 } else if (file_path->size() >= PATH_MAX) { in CreateOutputDir() [all …]
|
/third_party/skia/tools/ |
D | rewrite_includes.py | 77 for file_path in to_rewrite(): 78 if ('/generated/' in file_path or 79 'tests/sksl/' in file_path or 80 'third_party/skcms' in file_path): 82 if (file_path.endswith('.h') or 83 file_path.endswith('.c') or 84 file_path.endswith('.m') or 85 file_path.endswith('.mm') or 86 file_path.endswith('.inc') or 87 file_path.endswith('.cc') or [all …]
|
D | sanitize_source_files.py | 87 def TrailingWhitespaceRemover(line, file_path, line_number): argument 91 print('Removing trailing whitespace in %s:%s' % (file_path, line_number)) 95 def CrlfReplacer(line, file_path, line_number): argument 98 print('Replacing CRLF with LF in %s:%s' % (file_path, line_number)) 102 def TabReplacer(line, file_path, line_number): argument 105 print('Replacing Tab with whitespace in %s:%s' % (file_path, line_number)) 119 def EOFOneAndOnlyOneNewlineAdder(file_content, file_path): argument 124 print('Added exactly one newline to %s' % file_path) 128 def SvnEOLChecker(file_content, file_path): argument 131 'svn propget svn:eol-style %s' % file_path) [all …]
|
/third_party/mindspore/mindspore/ccsrc/profiler/device/ |
D | data_saver.cc | 99 std::string file_path = saver_base_dir + "/" + op_side_ + "_op_type_info_" + device_id_ + ".csv"; in WriteOpType() local 100 std::ofstream ofs(file_path); in WriteOpType() 103 MS_LOG(WARNING) << "Open file '" << file_path << "' failed!"; in WriteOpType() 121 MS_LOG(ERROR) << "Write " << file_path << "failed: " << e.what(); in WriteOpType() 124 ChangeFileMode(file_path); in WriteOpType() 125 MS_LOG(INFO) << "Write " << op_type_infos_.size() << " op type infos into file: " << file_path; in WriteOpType() 129 …std::string file_path = saver_base_dir + "/" + op_side_ + "_op_detail_info_" + device_id_ + ".csv"; in WriteOpDetail() local 130 std::ofstream ofs(file_path); in WriteOpDetail() 132 MS_LOG(WARNING) << "Open file '" << file_path << "' failed!"; in WriteOpDetail() 150 MS_LOG(ERROR) << "Write " << file_path << "failed: " << e.what(); in WriteOpDetail() [all …]
|
/third_party/flutter/skia/tools/ |
D | rewrite_includes.py | 71 for file_path in to_rewrite(): 72 if 'generated' in file_path: 74 if (file_path.endswith('.h') or 75 file_path.endswith('.c') or 76 file_path.endswith('.m') or 77 file_path.endswith('.mm') or 78 file_path.endswith('.inc') or 79 file_path.endswith('.fp') or 80 file_path.endswith('.cc') or 81 file_path.endswith('.cpp')): [all …]
|
D | sanitize_source_files.py | 85 def TrailingWhitespaceRemover(line, file_path, line_number): argument 89 print 'Removing trailing whitespace in %s:%s' % (file_path, line_number) 93 def CrlfReplacer(line, file_path, line_number): argument 96 print 'Replacing CRLF with LF in %s:%s' % (file_path, line_number) 100 def TabReplacer(line, file_path, line_number): argument 103 print 'Replacing Tab with whitespace in %s:%s' % (file_path, line_number) 117 def EOFOneAndOnlyOneNewlineAdder(file_content, file_path): argument 122 print 'Added exactly one newline to %s' % file_path 126 def SvnEOLChecker(file_content, file_path): argument 129 'svn propget svn:eol-style %s' % file_path) [all …]
|
/third_party/python/Lib/test/ |
D | test_tabnanny.py | 76 self.file_path = f.name 77 return self.file_path 80 unlink(self.file_path) 168 with TemporaryPyFile(SOURCE_CODES["error_free"]) as file_path: 169 self.verify_tabnanny_check(file_path) 183 for file_path in (file1_path, file2_path): 203 with TemporaryPyFile(SOURCE_CODES["wrong_indented"]) as file_path: 207 self.verify_tabnanny_check(file_path, err=err) 211 with TemporaryPyFile(SOURCE_CODES["incomplete_expression"]) as file_path: 214 self.verify_tabnanny_check(file_path, err=err) [all …]
|
/third_party/mindspore/tests/ut/cpp/dataset/ |
D | data_helper_test.cc | 50 std::string file_path = datasets_root_path_ + "/testAlbum/images/1.json"; in TEST_F() local 53 Status rc = dh.UpdateArray(file_path, "label", new_label); in TEST_F() 61 std::string file_path = datasets_root_path_ + "/testAlbum/original"; in TEST_F() local 64 Status rc = dh.CreateAlbum(file_path, out_path); in TEST_F() 72 std::string file_path = datasets_root_path_ + "/testAlbum/testout/2.json"; in TEST_F() local 75 Status rc = dh.UpdateArray(file_path, "label", new_label); in TEST_F() 83 std::string file_path = datasets_root_path_ + "/testAlbum/testout/3.json"; in TEST_F() local 86 Status rc = dh.UpdateArray(file_path, "label", new_label); in TEST_F() 94 std::string file_path = datasets_root_path_ + "/testAlbum/testout/4.json"; in TEST_F() local 97 Status rc = dh.UpdateValue(file_path, "label", new_label); in TEST_F() [all …]
|
D | c_api_dataset_flickr_test.cc | 30 std::string file_path = datasets_root_path_ + "/testFlickrData/flickr30k/test1.token"; in TEST_F() local 33 std::shared_ptr<Dataset> ds = Flickr(dataset_path, file_path); in TEST_F() 63 std::string file_path = datasets_root_path_ + "/testFlickrData/flickr30k/test1.token"; in TEST_F() local 66 std::shared_ptr<Dataset> ds1 = Flickr(dataset_path, file_path); in TEST_F() 67 std::shared_ptr<Dataset> ds2 = Flickr(dataset_path, file_path); in TEST_F() 138 std::string file_path = datasets_root_path_ + "/testFlickrData/flickr30k/test3.token"; in TEST_F() local 139 std::shared_ptr<Dataset> ds = Flickr(dataset_path, file_path); in TEST_F() 184 std::string file_path = datasets_root_path_ + "/testFlickrData/flickr30k/test1.token"; in TEST_F() local 186 …std::shared_ptr<Dataset> ds = Flickr(dataset_path, file_path, true, std::make_shared<RandomSampler… in TEST_F() 219 std::string file_path = datasets_root_path_ + "/testFlickrData/flickr30k/test1.token"; in TEST_F() local [all …]
|
D | c_api_dataset_manifest_test.cc | 29 std::string file_path = datasets_root_path_ + "/testManifestData/cpp.json"; in TEST_F() local 31 std::shared_ptr<Dataset> ds = Manifest(file_path); in TEST_F() 60 std::string file_path = datasets_root_path_ + "/testManifestData/cpp.json"; in TEST_F() local 62 std::shared_ptr<Dataset> ds1 = Manifest(file_path); in TEST_F() 63 std::shared_ptr<Dataset> ds2 = Manifest(file_path); in TEST_F() 148 std::string file_path = datasets_root_path_ + "/testManifestData/cpp.json"; in TEST_F() local 150 …std::shared_ptr<Dataset> ds = Manifest(file_path, "train", std::make_shared<RandomSampler>(), {}, … in TEST_F() 182 std::string file_path = datasets_root_path_ + "/testManifestData/cpp.json"; in TEST_F() local 184 std::shared_ptr<Dataset> ds = Manifest(file_path, "eval"); in TEST_F() 213 std::string file_path = datasets_root_path_ + "/testManifestData/cpp.json"; in TEST_F() local [all …]
|
/third_party/mindspore/tests/ut/python/ |
D | test_log.py | 69 file_path = '/tmp/log/mindspore_test' 72 os.environ['GLOG_log_dir'] = file_path 73 if os.path.exists(file_path): 74 shutil.rmtree(file_path) 76 os.makedirs(file_path, exist_ok=True) 80 file_path += '/rank_0/logs' 81 f_list = os.listdir(file_path) 94 if os.path.exists(file_path): 95 shutil.rmtree(file_path) 108 file_path = '/tmp/log/mindspore_test' [all …]
|
/third_party/json/third_party/amalgamate/ |
D | amalgamate.py | 46 def actual_path(self, file_path): argument 47 if not os.path.isabs(file_path): 48 file_path = os.path.join(self.source_path, file_path) 49 return file_path 53 def find_included_file(self, file_path, source_dir): argument 59 search_path = os.path.join(search_dir, file_path) 89 for file_path in self.sources: 93 print(" - processing \"{0}\"".format(file_path)) 94 t = TranslationUnit(file_path, self, True) 254 def __init__(self, file_path, amalgamation, is_root): argument [all …]
|
/third_party/mindspore/mindspore/ccsrc/profiler/device/gpu/ |
D | gpu_data_saver.cc | 162 std::string file_path = file_path_base + std::to_string(device_info.first) + ".csv"; in WriteActivity() local 163 std::ofstream ofs(file_path); in WriteActivity() 165 MS_LOG(WARNING) << "Open file '" << file_path << "' failed!"; in WriteActivity() 188 ChangeFileMode(file_path); in WriteActivity() 191 …S_LOG(INFO) << "Write " << device_info.second.size() << " activity infos into file: " << file_path; in WriteActivity() 196 std::string file_path = saver_base_dir + "/step_trace_profiling_" + device_id_ + ".txt"; in WriteStepTraceAsyncLaunchKernel() local 197 std::ofstream ofs(file_path); in WriteStepTraceAsyncLaunchKernel() 200 MS_LOG(WARNING) << "Open file '" << file_path << "' failed!"; in WriteStepTraceAsyncLaunchKernel() 282 MS_LOG(ERROR) << "Write " << file_path << "failed:" << e.what(); in WriteStepTraceAsyncLaunchKernel() 290 ChangeFileMode(file_path); in WriteStepTraceAsyncLaunchKernel() [all …]
|
/third_party/gn/src/gn/ |
D | string_output_buffer.cc | 54 bool StringOutputBuffer::ContentsEqual(const base::FilePath& file_path) const { in ContentsEqual() 59 if (!base::GetFileSize(file_path, &file_size) || in ContentsEqual() 65 std::ifstream file(file_path.As8Bit().c_str(), std::ios::binary); in ContentsEqual() 84 bool StringOutputBuffer::WriteToFile(const base::FilePath& file_path, in WriteToFile() argument 87 if (!base::CreateDirectory(file_path.DirName())) { in WriteToFile() 91 "I was using \"" + FilePathToUTF8(file_path.DirName()) + "\"."); in WriteToFile() 100 bool success = writer.Create(file_path); in WriteToFile() 114 "I was writing \"" + FilePathToUTF8(file_path) + "\"."); in WriteToFile() 119 bool StringOutputBuffer::WriteToFileIfChanged(const base::FilePath& file_path, in WriteToFileIfChanged() argument 121 if (ContentsEqual(file_path)) in WriteToFileIfChanged() [all …]
|
D | file_writer_unittest.cc | 19 base::FilePath file_path = temp_dir.GetPath().AppendASCII("foo.txt"); in TEST() local 22 EXPECT_TRUE(writer.Create(file_path)); in TEST() 26 EXPECT_TRUE(ContentsEqual(file_path, data)); in TEST() 35 base::FilePath file_path = temp_dir.GetPath().AppendASCII("foo.txt"); in TEST() local 38 EXPECT_TRUE(writer.Create(file_path)); in TEST() 43 EXPECT_TRUE(ContentsEqual(file_path, data)); in TEST()
|
D | string_output_buffer_unittest.cc | 91 base::FilePath file_path = temp_dir.GetPath().AppendASCII("foo.txt"); in TEST() local 92 base::WriteFile(file_path, data.c_str(), static_cast<int>(data.size())); in TEST() 98 EXPECT_TRUE(buffer.ContentsEqual(file_path)); in TEST() 102 EXPECT_FALSE(buffer.ContentsEqual(file_path)); in TEST() 110 EXPECT_FALSE(buffer.ContentsEqual(file_path)); in TEST() 122 base::FilePath file_path = in TEST() local 128 EXPECT_TRUE(buffer.WriteToFile(file_path, nullptr)); in TEST() 132 ASSERT_TRUE(base::GetFileInfo(file_path, &file_info)); in TEST() 133 ASSERT_TRUE(buffer.ContentsEqual(file_path)); in TEST()
|
/third_party/icu/tools/unicodetools/com/ibm/rbm/ |
D | Occurance.java | 19 private String file_path; field in Occurance 26 Occurance (String file_name, String file_path, int line_number) { in Occurance() argument 28 this.file_path = file_path; in Occurance() 45 return file_path; in getFilePath() 61 return "Occurance: " + file_path + " (" + line_number + ")"; in toString()
|
/third_party/mindspore/mindspore/ops/bprop_mindir/ |
D | generate_mindir.py | 68 file_path = os.path.join(bprop_src_dir, line) variable 69 if os.path.isfile(file_path): 70 print("copy: " + file_path) 71 shutil.copy(file_path, bprop_installed_dir) 82 file_path = os.path.join(bprop_mindir_export_dir, line) variable 83 if file_path.endswith(".mindir") and os.path.isfile(file_path): 84 print("copy: " + file_path) 85 shutil.copy(file_path, bprop_mindir_src_dir)
|
/third_party/boost/libs/mpl/preprocessed/ |
D | preprocess.py | 24 file_path = "%s.hpp" % os.path.splitext( file )[0] 29 , 'file_path': file_path 32 os.rename( file_path, "%s.tmp" % file_path ) 33 pp.main( "%s.tmp" % file_path, file_path ) 34 os.remove( "%s.tmp" % file_path ) 36 filename = os.path.basename(file_path)
|
/third_party/iptables/extensions/ |
D | genInit.py | 30 def _make_dir(file_path): argument 31 is_exist = os.path.exists(file_path) 32 print (file_path) 34 os.makedirs(file_path) 35 print (file_path) 38 def _read_file(file_path): argument 39 file_handler = open(file_path, 'r+', encoding='utf-8') 45 def _write_file(file_path, content): argument 46 file_handler = open(file_path, 'w', encoding='utf-8')
|
/third_party/mindspore/mindspore/ccsrc/debug/rdr/ |
D | string_recorder.cc | 29 std::string file_path = realpath.value() + ".txt"; in Export() local 30 ChangeFileMode(file_path, S_IRWXU); in Export() 31 std::ofstream fout(file_path, std::ofstream::app); in Export() 33 MS_LOG(WARNING) << "Open file for saving string failed. File path: '" << file_path << "'."; in Export() 39 ChangeFileMode(file_path, S_IRUSR); in Export()
|
/third_party/flatbuffers/tests/fuzzer/ |
D | flatbuffers_monster_fuzzer.cc | 44 bool TestFileExists(fs::path file_path) { in TestFileExists() argument 45 if (file_path.has_filename() && fs::exists(file_path)) return true; in TestFileExists() 47 TEST_OUTPUT_LINE("@DEBUG: file '%s' not found", file_path.string().c_str()); in TestFileExists() 48 for (const auto &entry : fs::directory_iterator(file_path.parent_path())) { in TestFileExists() 55 const auto file_path = exe_path_.parent_path() / file_name; in LoadBinarySchema() local 56 TEST_EQ(true, TestFileExists(file_path)); in LoadBinarySchema() 58 TEST_EQ(true, flatbuffers::LoadFile(file_path.string().c_str(), true, &schemafile)); in LoadBinarySchema()
|
/third_party/mindspore/mindspore/lite/minddata/wrapper/ |
D | MDToDApi.cc | 373 std::string file_path; in MDToDApi_UpdateEmbeding() local 374 if (GetJsonFullFileName(pMDToDApi, &file_path) != 0) { in MDToDApi_UpdateEmbeding() 379 MS_LOG(INFO) << "Updating json file: " << file_path; in MDToDApi_UpdateEmbeding() 380 rc = dh.UpdateValue(file_path, std::string(column), embedding_file_path); in MDToDApi_UpdateEmbeding() 382 MS_LOG(ERROR) << "Fail to update json: " << file_path << "."; in MDToDApi_UpdateEmbeding() 390 std::string file_path; in MDToDApi_UpdateStringArray() local 391 if (GetJsonFullFileName(pMDToDApi, &file_path) != 0) { in MDToDApi_UpdateStringArray() 395 MS_LOG(INFO) << "Start Update string Array column: " << columnName << " in file " << file_path; in MDToDApi_UpdateStringArray() 405 Status rc = dh.UpdateArray(file_path, columnName, strVec); in MDToDApi_UpdateStringArray() 407 MS_LOG(ERROR) << "Fail to update json: " << file_path << "."; in MDToDApi_UpdateStringArray() [all …]
|
/third_party/musl/ndk-test/script/ |
D | build.py | 36 file_path = os.path.join(comliler_dir,name) 38 if os.path.isdir(file_path): 39 for f_name in os.listdir(file_path): 41 os.chdir(file_path) 60 file_path = os.path.join(find_dir,name) 61 for curdir, dirs, files in os.walk(file_path): 65 src = os.path.join(file_path,dirname) 94 file_path = os.path.join(find_dir,name) 95 del_file_path = os.path.join(file_path)
|
/third_party/skia/third_party/externals/tint/src/ |
D | source.h | 149 : range(rng), file_path(file->path), file_content(&file->content) {} in Source() 159 : range(rng), file_path(path), file_content(content) {} in range() 163 return Source(Range{range.begin}, file_path, file_content); in Begin() 168 return Source(Range{range.end}, file_path, file_content); in End() 175 return Source(range + n, file_path, file_content); 182 if (file_path != rhs.file_path) { 198 start.file_path, start.file_content); in Combine() 204 std::string file_path; variable
|