Repository navigation
Add new SavedModelToIreeABIPass. - #5367
Conversation
a53073d to
88901fc
Compare
88901fc to
0018b34
Compare
benvanik
left a comment
There was a problem hiding this comment.
first pass of function_abi.md
| If, however, a `buffer-type` is not fully specified, the compiler may emit a special _result allocator_ function, which will be referenced in the `fbr` attribute. Such a function would have a signature like this: | ||
|
|
||
| ```c++ | ||
| tuple<buffer> __allocate_results(tuple<int> dynamic_dims); |
There was a problem hiding this comment.
The tflite bindings do this now - the style used there is (output_index, list<dims>) which makes calling it much easier - the bindings can just pass through the information without having to do any argument munging/reflection/etc, and it's stable to the dimensions changing between static and dynamic (an assertion can check that static dimensions were provided the correct values while dynamic dimensions are within expectations).
See:
https://github.com/google/iree/blob/f02a32f88242479c37a249d1c6bbe7637545ca36/iree/compiler/Bindings/TFLite/Transforms/test/materialize_shape_support.mlir#L84-L112
https://github.com/google/iree/blob/f02a32f88242479c37a249d1c6bbe7637545ca36/bindings/tflite/interpreter.c#L197-L202
having it be per output avoids the need for any kind of packing/striding/etc (you can check rank assertions per output, whether an output is out of bounds, etc).
| Such an enhancement would almost certainly necessitate a major version bump in | ||
| the ABI and would be logical to implement once the advanced features above are | ||
| functional. | ||
| Such an enhancement would almost certainly necessitate a major version bump in the ABI and would be logical to implement once the advanced features above are functional. |
There was a problem hiding this comment.
one of the reasons to do it with buffer_view attrs - no need to change the ABI version/recompile apps/models/etc.
d310b5f to
e308313
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
1 similar comment
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
* Pass is not yet active in the pipeline. * Need to implement runtime support for it and will decide on an upgrade strategy then. * Could stand to add some more test cases, but they are hard to generate, and I will mine some examples once I get it more e2e.
5664401 to
4e55f86
Compare
No description provided.