Skip to content

Enable tile + distribute of tensor.insert_slice. - #7243

Merged
MaheshRavishankar merged 1 commit into
iree-org:mainfrom
MaheshRavishankar:enable_tensor_insert
Oct 4, 2021
Merged

MaheshRavishankar merged 1 commit into
iree-org:mainfrom
MaheshRavishankar:enable_tensor_insert

Conversation

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

This patch adds the external model for implementing TiledOpInterface
into IREE during initialization so that it is always available. This
allows tile + distribute of this operation at the flow level.

To get the distribution to work correctly, the arguments for the
destination and result in the dispatch region op need to be tied. The
current logic for legalization of dispatch region and tie-ing operands
does not support this. So this PR also reworks all of that to be more
robust.

This patch adds the external model for implementing `TiledOpInterface`
into IREE during initialization so that it is always available. This
allows tile + distribute of this operation at the flow level.

To get the distribution to work correctly, the arguments for the
destination and result in the dispatch region op need to be tied. The
current logic for legalization of dispatch region and tie-ing operands
does not support this. So this PR also reworks all of that to be more
robust.

@benvanik benvanik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm for the tie stuff - I was thinking the other day about adding a flow.tensor.undefined or something to let us express initialization memory (like linalg.init_tensor but shape aware and such), which would be useful for this (tied operands today will always be initialized as we can't know that they are never read)

@iree-github-actions-bot

Copy link
Copy Markdown
Contributor

Abbreviated Benchmark Summary

@ commit 8246f961da8d2a931168624d8109b7b0e8b1949a (vs. base aa3fddaf122409728dca65f6d2a8d6e173e4397c)

Regressed Benchmarks 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileNetV2 [fp32,imagenet] (TensorFlow) full-inference with IREE-Vulkan @ Pixel-4 (GPU-Adreno-640) 30 (vs. 28, 7.14%↑) 30 0
MobileSSD [fp32] (TFLite) 1-thread,little-core,full-inference with IREE-Dylib @ SM-G980F (CPU-ARMv8.2-A) 1866 (vs. 1746, 6.87%↑) 1900 101
MobileBertSquad [fp32] (TensorFlow) little-core,full-inference with IREE-Dylib-Sync @ SM-G980F (CPU-ARMv8.2-A) 5786 (vs. 5479, 5.60%↑) 5797 38

Improved Benchmarks 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
DeepLabV3 [fp32] (TFLite) big-core,full-inference with IREE-Dylib-Sync @ Pixel-4 (CPU-ARMv8.2-A) 594 (vs. 655, 9.31%↓) 593 70
MobileNetV2 [fp32,imagenet] (TensorFlow) kernel-execution with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 15 (vs. 16, 6.25%↓) 14 1

For more information:

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator Author

Issue #5045

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