Eliminate redundant check and unnecessary nested if. Improve detection by checking if underlying system supports file read requests via io_uring. This is to fix test failure on machines with old kernel versions.
TODO for later: Overlap disk reads with memcpy operations after reads are done by submitting 2 times groupsize operations into the submission queue. After the second submission, wait for the first set of submissions.
TODO for later: Consider using readv so that we don't need memcpy.
@chang-l tested the code (big thanks!), our detection logic works for old kernel versions that have io uring but does not support the file read operations.
Checklist
Please feel free to remove inapplicable items for your PR.
[ ] The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
[ ] I've leverage the tools to beautify the python and c++ code.
[ ] The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
[ ] All changes have test coverage
[ ] Code is well-documented
[ ] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
[ ] Related issue is referred in this PR
[ ] If the PR is for a new model/paper, I've updated the example index here.
@dgl-bot run [instance-type] [which tests] [compare-with-branch];
For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master
Description
Eliminate redundant check and unnecessary nested if. Improve detection by checking if underlying system supports file read requests via io_uring. This is to fix test failure on machines with old kernel versions.
TODO for later: Overlap disk reads with memcpy operations after reads are done by submitting 2 times groupsize operations into the submission queue. After the second submission, wait for the first set of submissions.
TODO for later: Consider using readv so that we don't need memcpy.
@chang-l tested the code (big thanks!), our detection logic works for old kernel versions that have io uring but does not support the file read operations.
Checklist
Please feel free to remove inapplicable items for your PR.
Changes