You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hal.interface.load.constant needs a SymbolRefAttr pointing to hal.interface #1519
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.
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.
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.
Activity
benvanik commentedon Apr 15, 2020
There is only ever one hal.interface available within the executable being translated so it's implicit, though it wouldn't hurt to specify.
antiagainst commentedon Apr 15, 2020
IMO making explicit is better: in the lowering we are not relying on implicit information.
benvanik commentedon Nov 22, 2020
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.
ScottTodd commentedon Jun 28, 2022
This issue is quite old. Is it still relevant and blocking something? Have the op names changed since this was filed?
benvanik commentedon Jun 28, 2022
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.
benvanik commentedon Oct 24, 2022
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.