Skip to content

Excise abseil usage from iree/ #3848

Closed

Description

@benvanik

Current usage under iree/ (excluding bindings/ and other non-core paths): https://gist.github.com/benvanik/9316c8bfd46d6910a1e996ac1427d6d4

It's cheap enough to keep around for tests and such, but it shouldn't be pulled into any end-user compiler or runtime binaries like it is now with flags/logging/etc that bring in 150-200KB of junk.

  • Replace usage of abseil flags in runtime binaries with something reasonable #3814: flags
  • Replace logging with a C log sink API #2843: logging (good to replace, but our core logging doesn't depend on abseil)
  • absl/base -> replace with iree/base/api.h or iree/base/threading.h (has most annotations already)
    • core_headers (used by statusor for absl::disjunction)
    • attributes.h
    • macros.h
    • thread_annotations.h
  • absl/container
    • flat_hash_map.h
    • flat_hash_set.h
    • inlined_vector.h
  • absl/memory/memory.h -> replace with iree/base/memory.h / std::make_unique / iree::wrap_unique
  • absl/strings
    • ascii.h
    • match.h
    • numbers.h
    • str_cat.h
    • str_format.h
    • str_join.h
    • str_replace.h
    • str_split.h
    • str_strip.h
    • string_view.h
  • absl/synchronization/mutex.h
    • use in IREE -> replace with iree/base/synchronization.h + optional c++ wrapper?)
    • VMA adapter - needs iree_mutex_t reader/writer lock support
  • absl/types
    • optional.h (std::optional in c++17)
    • span.h
    • variant.h (unused)
  • absl/utility
    • c++11 compat std::remove_cv_t etc
    • c++14 compat absl::exchange etc
    • c++17 compat std::disjunction etc

Activity

  1. self-assigned this
    on Nov 16, 2020
  2. added this to the milestone on Nov 16, 2020
  3. added
    runtime/api
    runtime
    ew 🤮
    on Nov 20, 2020
  4. removed this from the milestone on Nov 22, 2020
  5. self-assigned this
    on Apr 1, 2021
  6. ScottTodd commented on Apr 8, 2021

    @ScottTodd
    Member

    Most of the simple replacements are done now (assuming no other undiscovered bugs >_>).

    absl/strings, span, and flags are the notable dependencies left... and each of those will require some more principled work to migrate off of.

  7. benvanik commented on Apr 8, 2021

    @benvanik
    CollaboratorAuthor

    I may try to take on flags soonish. VMLA replacement will drop most of our uses of Span. Dropping SIP (signature_parser) will remove some strings usage. HAL buffer_view/string_util are probably the trickiest core parts. Vulkan HAL still needs porting to C to drop the remaining Span usage in there.

  8. added
    platform/generic 🔩
    on Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ew 🤮platform/generic 🔩runtimeruntime/api

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions