Skip to content

hal.interface.load.constant needs a SymbolRefAttr pointing to hal.interface #1519

Closed as not planned

Description

@antiagainst

At the moment the hal.interface.load.constant op does not indicate from which hal.interface it is loading the push constant: https://google.github.io/iree/Dialects/HALDialect#halinterfaceloadconstant-ireehalinterfaceloadconstantop

Activity

  1. added
    compiler/dialects
    on Apr 14, 2020
  2. benvanik commented on Apr 15, 2020

    @benvanik
    Collaborator

    There is only ever one hal.interface available within the executable being translated so it's implicit, though it wouldn't hurt to specify.

  3. antiagainst commented on Apr 15, 2020

    @antiagainst
    MemberAuthor

    IMO making explicit is better: in the lowering we are not relying on implicit information.

  4. added
    bug 🐞
    on Nov 22, 2020
  5. added this to the milestone on Nov 22, 2020
  6. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator

    This is blocking HAL interface canonicalization too, where the opaque push constant count attribute (vs having named push constants) prevents any kind of sharing. Fixing this would allow us to rearrange push constants to dedupe them across all dispatches of an executable so two executables that take the same shape could store the dynamic dimension/computed strides/etc in the same offsets, removing the need to upload them twice. It'd also make it possible to create gaps in the push constant list such that two executables using different sets of constants could have a compatible layout and avoid additional runtime executable layout creation and potential pipeline reconfiguration.

  7. added
    enhancement ➕
    and removed
    bug 🐞
    on Nov 22, 2020
  8. modified the milestones: , on Nov 22, 2020
  9. added this to IREE Codegen and removed this from IREE Codegenon May 2, 2022
  10. ScottTodd commented on Jun 28, 2022

    @ScottTodd
    Member

    This issue is quite old. Is it still relevant and blocking something? Have the op names changed since this was filed?

  11. benvanik commented on Jun 28, 2022

    @benvanik
    Collaborator

    I think we still want this so we can perform the canonicalizations - this is blocking that work. It's similar to the linking issue I've run into in #5662 (comment) where symbols for executable level constants are also required.

  12. moved this to Available in IREEon Jun 28, 2022
  13. benvanik commented on Oct 24, 2022

    @benvanik
    Collaborator

    I'm not sure we need this anymore as defined now that interfaces have mostly been replaced with #hal.pipeline.layout. We still need a way to canonicalize the constants such that multiple dispatches taking the same values end up with those values in the same push constant slots but that could probably be done as a dedicated analysis + pass instead of being structural.

  14. Repository owner moved this from Available to Done in IREEon Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

compiler/dialectsenhancement ➕

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions