Skip to content

Continue pruning abseil usage: switch from absl::InlinedVector to std::vector. - #5302

Merged
ScottTodd merged 3 commits into
iree-org:mainfrom
ScottTodd:absl-cleanup
Apr 5, 2021
Merged

ScottTodd merged 3 commits into
iree-org:mainfrom
ScottTodd:absl-cleanup

Conversation

@ScottTodd

@ScottTodd ScottTodd commented Apr 2, 2021 •

Copy link
Copy Markdown
Member

Also switched to using IREE_ATTRIBUTE_NOINLINE from ABSL_ATTRIBUTE_NOINLINE.

Generated via a pile of regex (code, includes, build deps) and manual cleanup until builds passed again.

  • native modules needed some extra changes to work around calling iree_hal_buffer_view_shape with rank 0

@ScottTodd ScottTodd added runtime Relating to the IREE runtime library cleanup 🧹 labels Apr 2, 2021
@google-cla google-cla Bot added the cla: yes label Apr 2, 2021
@benvanik

benvanik commented Apr 2, 2021

Copy link
Copy Markdown
Collaborator

seems fine to me - none of these places are load-bearing in that if you are formatting a tensor to a string then you shouldn't be scared of a single extra heap alloc ;)
there's a few places like in the python bindings that could benefit (for shapes and such), but that's also in the non-load-bearing category and we know we want to rework all of that anyway (it's not a rock-solid production-optimized path)

@ScottTodd

Copy link
Copy Markdown
Member Author

seems fine to me - none of these places are load-bearing in that if you are formatting a tensor to a string then you shouldn't be scared of a single extra heap alloc ;)
there's a few places like in the python bindings that could benefit (for shapes and such), but that's also in the non-load-bearing category and we know we want to rework all of that anyway (it's not a rock-solid production-optimized path)

We could make bindings/ special, and I could just exclude that directory from my regex replacements. At a certain point, being in the same repository means being limited by stuff like this though: https://github.com/google/iree/blob/402550bcbdd47ef96a599c3fdb5bbd071bbfb1a1/build_tools/cmake/iree_copts.cmake#L309-L312

@benvanik

benvanik commented Apr 2, 2021

Copy link
Copy Markdown
Collaborator

We could make bindings/ special, and I could just exclude that directory from my regex replacements.

good point - we can leave the python bindings as-is for now - and then eventually move that linkopts just to the python bindings and out of the defaults

Comment thread iree/modules/check/native_module.cc Resolved
@ScottTodd
ScottTodd force-pushed the absl-cleanup branch 2 times, most recently from 4fc718d to 952e84e Compare April 2, 2021 23:54
@ScottTodd
ScottTodd marked this pull request as ready for review April 3, 2021 00:00
@ScottTodd
ScottTodd requested a review from benvanik April 3, 2021 00:00
@ScottTodd

Copy link
Copy Markdown
Member Author

Alright, I think the builds are on track to go green once Kokoro stops tripping over itself. The latest commit has some real changes, while the others are mostly simple replacements.

@ScottTodd
ScottTodd merged commit ce0285f into iree-org:main Apr 5, 2021
@ScottTodd
ScottTodd deleted the absl-cleanup branch April 5, 2021 15:12
ScottTodd added a commit that referenced this pull request Apr 7, 2021
More fallout from #5302 :/

Actually caught by validation layer warnings about `pQueuePriorities` being null when it must not be.

In debug builds, this incorrect use of references sometimes allocated crazy amounts of memory by using uninitialized memory as the size to resize to... ouch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup 🧹 runtime Relating to the IREE runtime library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants