Skip to content

Merging dynamic shapes feature branch. - #1249

Closed
benvanik wants to merge 16 commits into
masterfrom
benvanik-dynamic-shapes
Closed

benvanik wants to merge 16 commits into
masterfrom
benvanik-dynamic-shapes

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

This implements some new VM/tblgen support to enable more advanced marshaling (such as lists of tuples, strings, etc). These features are used to emit nice layout type ops and a much nicer centralized layout/executable caching scheme. Finally, the layouts are extended to support push constants and marshal primitive types to executables.

This also switches i32->index almost everywhere, as it was the only way to make all of the new code dealing with shape dimensions and offsets and descriptor set info work.

@benvanik benvanik added enhancement ➕ New feature or request compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) runtime Relating to the IREE runtime library labels Mar 25, 2020

@stellaraccident stellaraccident 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.

Comments on first commit

Comment thread iree/compiler/Dialect/HAL/IR/HALOps.cpp Resolved
Comment thread iree/compiler/Dialect/HAL/IR/HALOps.td Resolved
Comment thread iree/hal/api.h Resolved
Comment thread iree/hal/command_buffer_validation.cc Resolved
Comment thread iree/modules/hal/hal_module.cc Resolved

@stellaraccident stellaraccident 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.

Comments on second commit

Comment thread iree/compiler/Dialect/VM/IR/VMOps.td Resolved
Comment thread iree/compiler/Dialect/VM/IR/VMOps.td Resolved
Comment thread iree/compiler/Dialect/VM/IR/VMOps.td Resolved
Comment thread iree/compiler/Dialect/VM/IR/VMOps.td Resolved
Comment thread iree/vm/bytecode_dispatch.c Resolved
Comment thread iree/vm/bytecode_dispatch.c Resolved

@stellaraccident stellaraccident 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.

Quite a few comments that would aid readability but nothing material. Feel free to address in this train or the next.

Comment thread iree/compiler/Dialect/HAL/IR/HALOps.td Resolved
Comment thread iree/compiler/Dialect/HAL/IR/HALOps.td Resolved
Comment thread build_tools/cmake/iree_lit_test.cmake Resolved
@benvanik
benvanik force-pushed the benvanik-dynamic-shapes branch 3 times, most recently from 84b3c49 to 1af5e09 Compare March 26, 2020 04:12
@benvanik
benvanik force-pushed the benvanik-dynamic-shapes branch 3 times, most recently from b6fddd5 to 73e35cf Compare March 26, 2020 19:19
benvanik added 14 commits March 26, 2020 13:43
This will allow many of the tuple types to be converted to attributes
to make working with them much easier and allow easier optimizations
as now instead of SSA values representing constants they are now actual
attributes.
This will allow lookup tables to be used to avoid conditions/branches.
This moves to an initialization-time compilation of all executables and
adds executable/descriptor set layout caching. This can be extended in the
future to batch compilation, however now at least we have one place to
profile to get total launch time metrics even if we aren't doing fancy
asynchronous compilation.
…ions.

These can be used for other arbitrary arguments in the future (such as
runtime-computed/system-provided limits, etc).
They are converted to i32 during VM lowering.
@benvanik
benvanik force-pushed the benvanik-dynamic-shapes branch from 73e35cf to bee5056 Compare March 26, 2020 20:59
@benvanik
benvanik force-pushed the benvanik-dynamic-shapes branch from bee5056 to 7f51637 Compare March 26, 2020 22:20
@benvanik
benvanik deleted the benvanik-dynamic-shapes branch March 27, 2020 19:32
copybara-service Bot pushed a commit that referenced this pull request Jun 10, 2020
These were turned off at some point as part of enabling dynamic shapes (#1249) and then never turned back on... They all pass.

Closes #2158

COPYBARA_INTEGRATE_REVIEW=#2158 from GMNGeoffrey:enable_llvm bcd4607
PiperOrigin-RevId: 315734761
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) enhancement ➕ New feature or request runtime Relating to the IREE runtime library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants