Skip to content

Rework the logic that avoids fusions when that lead to stack allocatiions. - #12277

Merged
MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:rework_allocation_based_fusion
Feb 22, 2023
Merged

MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:rework_allocation_based_fusion

Conversation

@MaheshRavishankar

@MaheshRavishankar MaheshRavishankar commented Feb 18, 2023 •

Copy link
Copy Markdown
Collaborator

Rework the logic that prevents fusions that result in stack allocation. This is mostly a WAR since these dispatches should be lowered without any stack allocation. The root cause is that these dispatches are not vectorized. When vectorized there wont be a stack allocation.

benchmarks: x86_64, cuda

…ons.

Rework the logic that prevents fusions that result in stack
allocation. This is mostly a WAR since these dispatches should be
lowered without any stack allocation. The root cause is that these
dispatches are not vectorized. When vectorized there wont be a stack
allocation.
@iree-github-actions-bot

iree-github-actions-bot commented Feb 18, 2023 •

Copy link
Copy Markdown
Contributor

Abbreviated Android Benchmark Summary

@ commit 421002409af7098c06e00701b7eed67f0ea28f94 (vs. base 2f40854c548cbe082190d1dd1691a342ffd9006b)

Regressed Latencies 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
PoseNet [fp32] (TFLite) 4-thread,big-core,full-inference,default-flags with IREE-LLVM-CPU @ Pixel-4 (CPU-ARMv8.2-A) 89.697 (vs. 79.772, 12.44%↑) 89.887 1.932

Improved Latencies 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileBertSquad [fp16] (TFLite) full-inference,experimental-flags with IREE-Vulkan @ Pixel-6-Pro (GPU-Mali-G78) 119.090 (vs. 131.357, 9.34%↓) 119.870 2.904
MobileBertSquad [fp32] (TFLite) 4-thread,little-core,full-inference,default-flags with IREE-LLVM-CPU @ Pixel-6-Pro (CPU-ARMv8.2-A) 1249.488 (vs. 1355.172, 7.80%↓) 1235.896 43.895

For more information:

@MaheshRavishankar
MaheshRavishankar requested review from hanhanW and pzread and removed request for hanhanW February 19, 2023 01:36
@pzread

pzread commented Feb 19, 2023 •

Copy link
Copy Markdown
Contributor

I believe we want to run x86_64 and cuda benchmarks for this change? If so, put the line benchmarks: x86_64, cuda at the bottom of PR description and push a new commit (e.g. git commit --allow-empty -m 'Trigger build')

@github-actions

Copy link
Copy Markdown

Abbreviated Benchmark Summary

@ commit cab01ee80f934283ee89777982b3c06c7185baef (vs. base 96d959e01177e911ad3837e4799b530a7d931e16)

Regressed Latencies 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
Resnet50TF [fp32] (exported\_tf\_v2) [default-flags][full-inference,default-flags] with IREE-LLVM-CPU-Sync @ GCP-c2-standard-16 (CPU-x86\_64-CascadeLake) 196.661 (vs. 186.198, 5.62%↑) 196.974 2.054

Regressed Compilation Times 🚩

Benchmark Name Compilation Time (ms)
PoseNet\_fp32 [fp32] (exported\_tflite) [cpu-armv8.2-a-generic-linux-android29] experimental-flags,mmt4d,compile-stats 26516 (vs. 22746, 16.57%↑)
MobileNetV3Small\_fp32 [fp32,imagenet] (exported\_tflite) [cpu-x86\_64-cascadelake-linux-gnu] default-flags,compile-stats 42371 (vs. 36395, 16.42%↑)
MobileNetV2\_fp32 [fp32,imagenet] (exported\_tflite) [gpu-valhall-mali-android31] default-flags,compile-stats 28770 (vs. 24904, 15.52%↑)

[Top 3 out of 7 results showed]

Improved Compilation Times 🎉

Benchmark Name Compilation Time (ms)
MobileSSD\_fp32 [fp32] (exported\_tflite) [cpu-x86\_64-cascadelake-linux-gnu] default-flags,compile-stats 47764 (vs. 63403, 24.67%↓)
MobileSSD\_fp32 [fp32] (exported\_tflite) [gpu-adreno-generic-android31] default-flags,compile-stats 33464 (vs. 43518, 23.10%↓)
PoseNet\_fp32 [fp32] (exported\_tflite) [gpu-adreno-generic-android31] experimental-flags,fuse-padding,compile-stats 11246 (vs. 14184, 20.71%↓)

[Top 3 out of 68 results showed]

For more information:

Source Workflow Run

@MaheshRavishankar
MaheshRavishankar merged commit 5c78e87 into iree-org:main Feb 22, 2023
qedawkins pushed a commit to qedawkins/iree that referenced this pull request Apr 2, 2023
…ions. (iree-org#12277)

Rework the logic that prevents fusions that result in stack allocation. This is mostly a WAR since these dispatches should be lowered without any stack allocation. The root cause is that these dispatches are not vectorized. When vectorized there wont be a stack allocation.
jpienaar pushed a commit that referenced this pull request May 1, 2023
…ions. (#12277)

Rework the logic that prevents fusions that result in stack allocation. This is mostly a WAR since these dispatches should be lowered without any stack allocation. The root cause is that these dispatches are not vectorized. When vectorized there wont be a stack allocation.
rengolin pushed a commit to plaidml/iree that referenced this pull request May 2, 2023
…ions. (iree-org#12277)

Rework the logic that prevents fusions that result in stack allocation. This is mostly a WAR since these dispatches should be lowered without any stack allocation. The root cause is that these dispatches are not vectorized. When vectorized there wont be a stack allocation.
NatashaKnk pushed a commit to NatashaKnk/iree that referenced this pull request Jul 6, 2023
…ions. (iree-org#12277)

Rework the logic that prevents fusions that result in stack allocation. This is mostly a WAR since these dispatches should be lowered without any stack allocation. The root cause is that these dispatches are not vectorized. When vectorized there wont be a stack allocation.
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.

4 participants