New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallelize each level of BFS in GetMatchingPaths
#44310
Conversation
@mihaimaruseac Sorry for some careless compiling problems in the previous commit.. I have fixed them already. Could you please take a look and give any suggestions? |
First thing, the CI could crash because the Pr was approved by @SuperSaiyan-God who has no approval rights. @SuperSaiyan-God , please don't spam approve PRs, it goes against the code of conduct. Second, I see you are using Finally, this will also need to be replicated on the filesystem plugins side. |
@mihaimaruseac Thanks for your advising! As you mentioned, I have turned But I’m sorry I didn’t figure out the specific meaning of your last point... What do you mean that needs to be replicated, could you please explain it in more detail? Thanks! |
@mihaimaruseac tensorflow/tensorflow/c/experimental/filesystem/modular_filesystem.cc Lines 191 to 195 in 79cdd95
Beside, if there is a filesystem that has its own |
@mihaimaruseac Could you please check this again? |
Do you have some benchmarks for the implementation? |
@mihaimaruseac Thanks for leading the progress of this pr. I haved made benchmarks against two file systems separately, those are local posix file system and remote hdfs file system. For each file system, I used 4 different directories for benchmarking, the first of which is an empty directory to measure the fixed overhead of the operation itself. Each test is repeated 10 times and the average is taken as the result. The all benchmark results are as follows: System environment: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz 80 threads Local POSIX file system:
Remote HDFS file system:
P.S. The According to the results of the benchmarks, the effect of parallel optimization is quite obvious which approximately |
There seems to be some compilation errors that have nothing to do with the code I modified, and I would like to ask for advice how I should solve them to make the ci process run through? |
The errors are not your fault ( They are caused by the some other parts of the |
@vnvo2409 Okay, Thanks for your reply! : ) |
This is awesome. Thank you |
This is a PR from JIZHI Team & TaiJi AI platform in Tencent.
I have tried to submit a PR #44269 which parallelize the
tf.gfile.Glob
in Python, by multi-threaeds against multiple path patterns. This PR is going to optimize theGetMatchingPaths
in C++, which brings PBFS into the progress, parallelizes every level of tree by a additional queue. The optimizion can bring considerable performance improvement when the number of files to match reaches a certain level.Since the content of the change is different, I put this in another PR. @mihaimaruseac Could you please task a look at this? Thanks for your review!