Skip to content

Handle CPU single threaded with updated driver. - #5582

Merged
hanhanW merged 5 commits into
iree-org:mainfrom
hanhanW:mako-multi
Apr 26, 2021
Merged

hanhanW merged 5 commits into
iree-org:mainfrom
hanhanW:mako-multi

Conversation

@hanhanW

@hanhanW hanhanW commented Apr 23, 2021 •

Copy link
Copy Markdown
Contributor

IREE recently introduced new driver dylib-sync which is used for
single threaded. After discussion, this should run with taskset 80,
and the multithreaded version should run with taskset f0. The PR
also makes taskset configurable.

This is a step towards #4752

IREE recently introduced new driver `dylib-sync` which is used for
single threaded. After discussion, this should be run with `taskset 80`.
@google-cla google-cla Bot added the cla: yes label Apr 23, 2021
@hanhanW
hanhanW marked this pull request as draft April 23, 2021 07:54
@hanhanW
hanhanW marked this pull request as ready for review April 23, 2021 09:06
@hanhanW

hanhanW commented Apr 23, 2021

Copy link
Copy Markdown
Contributor Author

Tested in https://buildkite.com/iree/iree-android-benchmark/builds/2361

I will apply the update of mako configs before merging the PR.

Comment on lines +62 to +63
"adb", "shell", "LD_LIBRARY_PATH=/data/local/tmp", "taskset",
target.taskset, f"{DEVICE_ROOT}/iree-benchmark-module",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description doesn't seem to match what's happening here. It looks like we used to run everything with tasket 80 and now we're only doing that for dylib-sync. If true, that's something I'm concerned about because we'd once again be changing the definition of the benchmarks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GMNGeoffrey we are introducing multithreading and single thread benchmarks, for the single thread case we will run in core7 exclusively (for now) which what taskset 80 will do, and taskset F0 for the multithreading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good, but we also seem to be changing the taskset for, e.g. vulkan. I know this should be GPU bound, but I'm still quite leery of changing what we're measuring. How about instead we have single and multi-threaded benchmarks for each backend/driver?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. This is my mistake.. I somehow thought we used to benchmark with taskset f0. Let me change them all back to taskset 80.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we do any parallelism at the HAL/runtime side so we can always keep vulkan single threaded .
unpinning HAL from core7 might affect or not the overall performance depends on how expensive these HAL command buffers and other vulkan-hal stuff cc: @benvanik @antiagainst they know more here :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a separate problem. This PR basically refactors/exposes more options to TargetInfo, and correct single threaded version to use dylib-sync driver. I'm happy to address the issue in another PR if this is a concern.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it still makes sense to keep it pinned for consistency. It's not just specifying single-threaded, it's also pinning to big core

Comment on lines +62 to +63
"adb", "shell", "LD_LIBRARY_PATH=/data/local/tmp", "taskset",
target.taskset, f"{DEVICE_ROOT}/iree-benchmark-module",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GMNGeoffrey we are introducing multithreading and single thread benchmarks, for the single thread case we will run in core7 exclusively (for now) which what taskset 80 will do, and taskset F0 for the multithreading

Comment thread build_tools/mako/configuration.py Outdated
TargetInfo(name="dylib-llvm-aot",
TargetInfo(driver="vmla",
hal_target_backend="vmla",
taskset="f0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have a fair comparison between vmla and dylib-sync lets keep both running on the same core with taskset=f0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they should all be taskset=80?

@hanhanW hanhanW changed the title Handle CPU single threaded with updated driver and taskset. Handle CPU single threaded with updated driver. Apr 23, 2021
@hanhanW
hanhanW merged commit 9bd87ea into iree-org:main Apr 26, 2021
@hanhanW
hanhanW deleted the mako-multi branch April 26, 2021 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants