-
Notifications
You must be signed in to change notification settings - Fork 620
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
ExternalSource refactoring and fixing #5690
ExternalSource refactoring and fixing #5690
Conversation
0a7d371
to
2d912c3
Compare
CI MESSAGE: [19728778]: BUILD STARTED |
CI MESSAGE: [19728778]: BUILD FAILED |
fcbed73
to
717a164
Compare
CI MESSAGE: [19730281]: BUILD STARTED |
CI MESSAGE: [19730281]: BUILD FAILED |
CI MESSAGE: [19730281]: BUILD PASSED |
int device_id = order.is_device() ? order.device_id() : tl_elm->data.device_id(); | ||
cudaEvent_t event = tl_elm->GetCompletionEvent(order.device_id()); | ||
|
||
if (order.device_id() != device_id_ && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition is unreadable, can you make it a function with readable name? Like is is_ambiguous_order in access_order.cc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's done once per iteration, I think we can afford to just always go with the DeviceGuard
. I couldn't make such assumptions in access_order.cc
, but here it's quite different.
Alternatively, I can add an "record(cudaEvent_t)" function to AccessOrder - I'd rather not perpetuate the incidental complexity of stream handling in AccessOrder API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always add DeviceGuard. It takes 80ns on my machine and that's done once per iteration, so it's rather cheap.
CI MESSAGE: [19826818]: BUILD STARTED |
CI MESSAGE: [19826818]: BUILD FAILED |
- refactor CachingList - use proper "item" wrapper type - remove "apprentice" and simplify lookahead logic - remove weird make_unique dependence - use r-value when recycling - refactor ExternalSource - store TensorList by value in list items - move all iteration data to one structure and queue - associate events directly with data items - use global event pool and obtain events for proper streams ---- Signed-off-by: Michal Zientkiewicz <[email protected]>
Signed-off-by: Michal Zientkiewicz <[email protected]>
Signed-off-by: Michal Zientkiewicz <[email protected]>
Signed-off-by: Michal Zientkiewicz <[email protected]>
c77478b
to
afc953e
Compare
Signed-off-by: Michał Zientkiewicz <[email protected]>
CI MESSAGE: [19867432]: BUILD STARTED |
CI MESSAGE: [19867432]: BUILD PASSED |
Category:
Bug fix (non-breaking change which fixes an issue)
Refactoring (Redesign of existing code that doesn't affect functionality)
Description:
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A