Skip to content

Replacing use of dylib/vmvx(-sync) with local-task/local-sync drivers. - #9365

Merged
benvanik merged 2 commits into
mainfrom
benvanik-drop-dylib-vmvx
Jun 7, 2022
Merged

benvanik merged 2 commits into
mainfrom
benvanik-drop-dylib-vmvx

Conversation

@benvanik

@benvanik benvanik commented Jun 7, 2022 •

Copy link
Copy Markdown
Collaborator

This gets us to the proper orthogonality of execution model (sync or task) and supported executable formats (embedded elf, system library, or vmvx module).

There's a lot of misnamed tests that need to be cleaned up (the duplication of things like check_blah_vmvx_vmvx_blah) and they should become much more meaningful (local_sync_vmvx vs local_task_vmvx). The benchmark scripts had to be updated to separate what is a target configuration from the driver/loader used.

Fixes #4298 (loaders are now independent of execution model).

@benvanik benvanik added infrastructure Relating to build systems, CI, or testing hal/api IREE's public C hardware abstraction layer API cleanup 🧹 labels Jun 7, 2022
@benvanik
benvanik requested review from ScottTodd and pzread June 7, 2022 16:17
@benvanik
benvanik force-pushed the benvanik-drop-dylib-vmvx branch from 77a4ffc to 3dee1b2 Compare June 7, 2022 16:43
@benvanik
benvanik force-pushed the benvanik-local-hal-drivers branch from d0d0aa4 to a272a69 Compare June 7, 2022 17:04
@benvanik
benvanik force-pushed the benvanik-drop-dylib-vmvx branch 2 times, most recently from 1c4c4c1 to e004fba Compare June 7, 2022 18:06
Base automatically changed from benvanik-local-hal-drivers to main June 7, 2022 18:48
@benvanik
benvanik force-pushed the benvanik-drop-dylib-vmvx branch from e004fba to 1c38442 Compare June 7, 2022 18:56
@iree-github-actions-bot

Copy link
Copy Markdown
Contributor

Abbreviated Benchmark Summary

@ commit 33aa8b33bf4a0316939512c87107c47dfb137626 (vs. base 584681f4a152934d98a90bb44a25f3e60cfb413f)

Regressed Benchmarks 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileBertSquad [int8] (TFLite) 4-thread,little-core,full-inference,default-flags with IREE-Dylib @ Pixel-6-Pro (CPU-ARMv8.2-A) 1417 (vs. 1299, 9.08%↑) 1404 33
DeepLabV3 [fp32] (TFLite) little-core,full-inference,experimental-flags with IREE-Dylib-Sync @ Pixel-6-Pro (CPU-ARMv8.2-A) 376 (vs. 350, 7.43%↑) 377 2
DeepLabV3 [fp32] (TFLite) 1-thread,little-core,full-inference,default-flags with IREE-Dylib @ Pixel-6-Pro (CPU-ARMv8.2-A) 427 (vs. 404, 5.69%↑) 425 5

Improved Benchmarks 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileNetV3Small [fp32,imagenet] (TFLite) 1-thread,big-core,full-inference,default-flags with IREE-Dylib @ Pixel-4 (CPU-ARMv8.2-A) 11 (vs. 12, 8.33%↓) 11 0

For more information:

@iree-github-actions-bot

Copy link
Copy Markdown
Contributor

Abbreviated x86_64 Benchmark Summary (experimental)

@ commit 33aa8b33bf4a0316939512c87107c47dfb137626 (vs. base f900f508bc03b80b24b5f4b17db9564380fb2ed2)

Improved Benchmarks 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileNetV2 [fp32,imagenet] (TFLite) 1-thread,full-inference,default-flags with IREE-Dylib @ GCP-c2-standard-16 (CPU-x86\_64-CascadeLake) 14 (vs. 15, 6.67%↓) 14 0

For more information:

@powderluv

Copy link
Copy Markdown
Contributor

drive-by:

can the local variants just be sync_vmvx be sync_task and the remote variants when the come can be remote_... ?

Thanks

Comment on lines -38 to +40
Ensure that the `IREE_HAL_DRIVER_DYLIB` CMake option is `ON` when configuring
for the target.
Ensure that the `IREE_HAL_DRIVER_LOCAL_TASK` and
`IREE_HAL_EXECUTABLE_LOADER_EMBEDDED_ELF` CMake options are `ON` when
configuring for the target.

@ScottTodd ScottTodd Jun 7, 2022 •

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good catch - will leave that to a follow up - probably worth refreshing the structure to focus on execution mode vs the executable formats

@benvanik
benvanik merged commit 99097be into main Jun 7, 2022
@benvanik
benvanik deleted the benvanik-drop-dylib-vmvx branch June 7, 2022 21:07
ScottTodd added a commit that referenced this pull request Jun 8, 2022
Part of #4298, follow-up to #9365 (comment)

The main change here is renaming the `cpu-dylib` page to just `cpu` and adding some explanations for `local-sync` vs `local-task` and the executable format options.

There's still a bit to clean up to do around the `dylib-llvm-aot` compiler target name and a few lingering places in code that make assumptions about dependencies on threading.
jpienaar pushed a commit to jpienaar/iree that referenced this pull request Jun 10, 2022
…#9399)

Part of iree-org#4298, follow-up to iree-org#9365 (comment)

The main change here is renaming the `cpu-dylib` page to just `cpu` and adding some explanations for `local-sync` vs `local-task` and the executable format options.

There's still a bit to clean up to do around the `dylib-llvm-aot` compiler target name and a few lingering places in code that make assumptions about dependencies on threading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup 🧹 hal/api IREE's public C hardware abstraction layer API infrastructure Relating to build systems, CI, or testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate HAL driver registration from threading

4 participants