Skip to content

Don't outline splat constants. - #6816

Merged
benvanik merged 1 commit into
mainfrom
benvanik-dont-outline-splats
Oct 20, 2021
Merged

benvanik merged 1 commit into
mainfrom
benvanik-dont-outline-splats

Conversation

@benvanik

@benvanik benvanik commented Aug 20, 2021 •

Copy link
Copy Markdown
Collaborator

This turns them into flow.tensor.splats in streams instead which allows
for better locality, lower peak memory consumption, and fewer immutability
preserving clones.

Drops fixed memory consumption in FaceSSD by 4.7MB of useless zeros.

Fixes #6815.

@benvanik benvanik added compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) performance ⚡ Performance/optimization related work across the compiler and runtime labels Aug 20, 2021
@google-cla google-cla Bot added the cla: yes label Aug 20, 2021
@benvanik
benvanik force-pushed the benvanik-dont-outline-splats branch 2 times, most recently from b44ae35 to 97eec73 Compare August 20, 2021 19:39
@benvanik
benvanik force-pushed the benvanik-dont-outline-splats branch 3 times, most recently from 8dfe4ef to 6f0cbaa Compare August 20, 2021 22:37
@benvanik

Copy link
Copy Markdown
Collaborator Author

Blocked on needing to support emulated non-4-byte-aligned fills/copies. That's a biggie.

@benvanik

Copy link
Copy Markdown
Collaborator Author

@benvanik
benvanik force-pushed the benvanik-dont-outline-splats branch from 6f0cbaa to 0052573 Compare October 20, 2021 04:53
This turns them into flow.tensor.splats in streams instead which allows
for better locality, lower peak memory consumption, and fewer immutability
preserving clones.

Drops fixed memory consumption in FaceSSD by 4.7MB of useless zeros.

Fixes #6815.
@benvanik
benvanik force-pushed the benvanik-dont-outline-splats branch from 0052573 to 1018269 Compare October 20, 2021 05:08
@benvanik
benvanik requested a review from ScottTodd October 20, 2021 05:08
@benvanik

Copy link
Copy Markdown
Collaborator Author

This was made possible thanks to #7317.

@benvanik
benvanik marked this pull request as ready for review October 20, 2021 05:20
@benvanik
benvanik enabled auto-merge (squash) October 20, 2021 05:21
@iree-github-actions-bot

Copy link
Copy Markdown
Contributor

Abbreviated Benchmark Summary

@ commit 1018269e98952b5bcdcd932a1d6c20c4770f5c34 (vs. base ab58d17f38548efb9003626f0b135e55a07f5e12)

Regressed Benchmarks 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileSSD [fp32] (TFLite) little-core,full-inference with IREE-Dylib-Sync @ SM-G980F (CPU-ARMv8.2-A) 1691 (vs. 1591, 6.29%↑) 1714 61

Improved Benchmarks 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
PoseNet [fp32] (TFLite) kernel-execution with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 23 (vs. 40, 42.50%↓) 23 0
DeepLabV3 [fp32] (TFLite) kernel-execution with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 22 (vs. 35, 37.14%↓) 22 0
MobileBertSquad [fp32] (TensorFlow) big-core,full-inference with IREE-Dylib-Sync @ Pixel-4 (CPU-ARMv8.2-A) 669 (vs. 840, 20.36%↓) 669 1

[Top 3 out of 6 benchmark results showed]

For more information:

@benvanik
benvanik merged commit cc4f173 into main Oct 20, 2021
@benvanik
benvanik deleted the benvanik-dont-outline-splats branch October 20, 2021 15:34
bjacob pushed a commit to bjacob/iree that referenced this pull request Oct 21, 2021
This turns them into flow.tensor.splats in streams instead which allows
for better locality, lower peak memory consumption, and fewer immutability
preserving clones.

Drops fixed memory consumption in FaceSSD by 4.7MB of useless zeros.

Fixes iree-org#6815.
hcindyl added a commit to hcindyl/iree that referenced this pull request Oct 26, 2021
This reverts commit cc4f173.

Reason to revert: the change creates unaligned buffer fill

Change-Id: Iff9ba0d9f4b4993f8388ac9af8a2ba6aba577d77
stellaraccident pushed a commit that referenced this pull request Oct 26, 2021
This reverts commit cc4f173.

Reason to revert: the change creates unaligned buffer fill

Change-Id: Iff9ba0d9f4b4993f8388ac9af8a2ba6aba577d77
@hanhanW hanhanW mentioned this pull request Oct 28, 2021
ScottTodd added a commit to ScottTodd/iree that referenced this pull request Nov 3, 2021
ScottTodd added a commit to ScottTodd/iree that referenced this pull request Nov 3, 2021
ScottTodd added a commit that referenced this pull request Nov 3, 2021
This reverts commit c4e0f3b to roll forward #6816, now that #7370 has landed and unaligned buffer fills are supported by the compiler and runtime.

I tested this sequence of changes with the person_detect program mentioned at #7370 (comment) and #7462 (comment), but we don't yet have complete test coverage in the main IREE repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) performance ⚡ Performance/optimization related work across the compiler and runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't outline splat constants by default.

3 participants