Repository navigation
fix(clr): Reserve only the descriptor size a batch copy dispatch needs - #11650
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
marandje
left a comment
There was a problem hiding this comment.
I would remove the comment as code is descriptive enough already.
Right, How about test to be added?, JIRA has already provided reproducer. |
This is not a functional issue. It is increasing the enqueue time of hipMemcpyBatchAsync API if more than 16 dispatches are enqueued after a long kernel in the same stream. This can affect performance but doesn't break anything as such. Hence there is no new unit test required to be added for this specific scenario. |
Thanks — fix looks right, not blocking. Small nuance: hipMemcpyBatchAsync is an async enqueue, so blocking the host until the in-flight kernel finishes (~80 ms in the repro) is a behavior deviation, with perf as the visible symptom. hipMemcpyAsync doesn't do this, and 7.14 didn't either. Also, nothing in hipMemcpyBatchAsync.cc catches it today — those cases verify bytes after sync and never wrap the 16 kernarg chunks. A small case there (long kernel, 17 count==1 calls, assert enqueue isn't ~kernel duration) would cover it but I let you decide. Thanks! |
885cf08 to
db825af
Compare
TheRock Submodule Bump ActivityNewest first
|
Motivation
hipMemcpyBatchAsync call waits on the host side after 16 dispatches causing delays in enqueue.
Technical Details
hipMemcpyBatchAsync API should reserve only the total descriptor size on the kernel arg pool for that dispatch and not the maximum amount of chunk memory that can be allocated each time.
Issue Tracking
JIRA ID: ROCM-30841
Test Plan
Verify with the provided reproducer that hipMemcpyBatchAsync doesn't wait on the host side after 16 dispatches causing dispatch latency.
Test Result
PASS
Submission Checklist