-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support turbo mode for better latency but burn more power on CPU & NPU #250
Conversation
mamin506
commented
Sep 11, 2024
•
edited
Loading
edited
- Mailbox channel support three types: MGMT, USER_NORMAL and USER_POLL
- MGMT channel is interrupt based and good for not critical path.
- USER_NORMAL channel is interrupt based and good for critical path.
- USER_POLL channel is polling based and good for critical path which needs the best latency.
- Support "xrt-smi configure --pmode turbo"
- Only when no context is opened, change pmode from/to turbo are allowed.
- In turbo mode, all contexts are creating USER_POLL mailbox channel for best latency.
- Support hwq::poll_command() in shim
- Add shim_test for polling
test name | ID (wait in ioctl) | ID (polling) |
---|---|---|
latency | 25 | 41 |
throughput | 40 | 42 |
runlist latency | 39 | 43 |
runlist throughput | 30 | 44 |
Signed-off-by: Min Ma <min.ma@amd.com>
Signed-off-by: Min Ma <min.ma@amd.com>
Signed-off-by: Min Ma <min.ma@amd.com>
src/driver/amdxdna/aie2_pm.c
Outdated
@@ -41,7 +67,7 @@ int aie2_pm_set_mode(struct amdxdna_dev_hdl *ndev, enum amdxdna_power_mode_type | |||
if (ndev->pw_mode == target) | |||
return 0; | |||
|
|||
if (target == POWER_MODE_LOW || target == POWER_MODE_MEDIUM) | |||
if (target != POWER_MODE_DEFAULT && target != POWER_MODE_TURBO) |
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.
We need to support performance/default/turbo.
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.
fixed
test/shim_test/io_test.cpp
Outdated
if (io_test_parameters.wait == IO_TEST_POLL_WAIT) { | ||
auto start = clk::now(); | ||
while(!hwq->poll_command(bo->get())) { | ||
auto now = clk::now(); |
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 might be too heavy to call clk::now() for every poll.
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.
fixed
Signed-off-by: Min Ma <min.ma@amd.com>