-
Notifications
You must be signed in to change notification settings - Fork 622
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
Use DynamicScratchpad in KernelManager. #3670
Conversation
Signed-off-by: Michał Zientkiewicz <[email protected]>
CI MESSAGE: [3934559]: BUILD STARTED |
CI MESSAGE: [3934559]: BUILD FAILED |
CI MESSAGE: [3935973]: BUILD STARTED |
e32b71d
to
900733a
Compare
CI MESSAGE: [3936330]: BUILD STARTED |
CI MESSAGE: [3936330]: BUILD FAILED |
Signed-off-by: Michał Zientkiewicz <[email protected]>
CI MESSAGE: [3943354]: BUILD STARTED |
CI MESSAGE: [3943354]: BUILD FAILED |
Signed-off-by: Michał Zientkiewicz <[email protected]>
…allocating 0 bytes. Signed-off-by: Michał Zientkiewicz <[email protected]>
CI MESSAGE: [3957968]: BUILD STARTED |
CI MESSAGE: [3959429]: BUILD STARTED |
8252a74
to
1ef772c
Compare
…d, Convolution and Laplacian tests. Signed-off-by: Michał Zientkiewicz <[email protected]>
1ef772c
to
4c7e414
Compare
CI MESSAGE: [3959606]: BUILD STARTED |
CI MESSAGE: [3959606]: BUILD PASSED |
"Kernel instance index (instance_idx) out of range"); | ||
auto &inst = instances[instance_idx]; | ||
DynamicScratchpad scratchpad({}, AccessOrder(context.gpu.stream)); | ||
auto *old_scratchpad = context.scratchpad; |
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.
Why do we need context.scratchpad
for if we are not using it anyway here?
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.
It's used by the Run
method invoked afterwards.
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 was rather asking about the ideas of replacing the old one with one created here.
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.
Well, now the old one is always NULL, so we don't need to store it. I'll simplify it (again, possibly in a follow-up).
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.
Ok, let do that in a follow-up.
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.
So kernel manager scratchpads
are also to be removed in a follow-up, right?
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.
Yes, that's what I brought up in open floor. Since this involves an API change (we no longer need thread_idx), the change affects a large number of files - hence the decision to make the more important change that potentially affects performance (this one) first and then clean the rest.
Signed-off-by: Michal Zientkiewicz <[email protected]>
CI MESSAGE: [3968027]: BUILD STARTED |
CI MESSAGE: [3968027]: BUILD PASSED |
* Use DynamicScratchpad in KernelManager. * Use invalid stream as a default for KernelContext. * Lazily initialize upstream resources for dynamic scratchpad. * Do not initialize the underlying resource for DynamicScratchpad when allocating 0 bytes. Signed-off-by: Michal Zientkiewicz <[email protected]>
* Use DynamicScratchpad in KernelManager. * Use invalid stream as a default for KernelContext. * Lazily initialize upstream resources for dynamic scratchpad. * Do not initialize the underlying resource for DynamicScratchpad when allocating 0 bytes. Signed-off-by: Michal Zientkiewicz <[email protected]>
* Use DynamicScratchpad in KernelManager. * Use invalid stream as a default for KernelContext. * Lazily initialize upstream resources for dynamic scratchpad. * Do not initialize the underlying resource for DynamicScratchpad when allocating 0 bytes. Signed-off-by: Michal Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz [email protected]
Category:
New feature (non-breaking change which adds functionality)
Description:
The dynamic scratchpad is now the primary scratchpad implementation.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Checklist
Tests
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-2449