Find files with end str in directory.
(directory, end_str)
| 180 | |
| 181 | |
| 182 | def find_end_files(directory, end_str): |
| 183 | """ |
| 184 | Find files with end str in directory. |
| 185 | """ |
| 186 | gen_files = [] |
| 187 | for root, dirs, files in os.walk(directory): |
| 188 | for file in files: |
| 189 | if file.endswith(end_str): |
| 190 | gen_files.append(os.path.join(root, file)) |
| 191 | return gen_files |
| 192 | |
| 193 | |
| 194 | if paddle.is_compiled_with_rocm(): |