Repository navigation
[HAL] Refactor memory property attributes - #21005
Conversation
8c3eb08 to
f26f742
Compare
benvanik
left a comment
There was a problem hiding this comment.
looks good! few minor things
| IREE::HAL::BufferUsageBitfield bufferUsage, OpBuilder &builder) { | ||
| // Emit a select op to let the runtime decide which device/queue affinity to | ||
| // use if required. | ||
| static std::tuple<SmallVector<Value>, SmallVector<Value>> |
There was a problem hiding this comment.
I can't follow this and the change doesn't seem relevant to this PR. It should just need to take the Values and create AllocatorSelectOp as it did before.
There was a problem hiding this comment.
Before it did create a AllocatorSelectAttrOp using the DeviceOptimalAttr. I thought now i would need to create a ContextResolveOp for every affinity in the DeviceOptimalAttr to get the actual device Value and then emit the AllocatorSelectOp using these Values? Maybe you can give me some suggestion how this should be done instead?
There was a problem hiding this comment.
I'm not confident that resolving the devices this early is going to fully work with subsequent analysis, but we can give it a try!
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
Signed-off-by: default <[email protected]>
0d97e0d to
8f3c06b
Compare
| OpBuilder &builder) { | ||
| auto [devices, queueAffinities] = | ||
| lookupDevicesAndQueueAffintiesFor(op, builder); | ||
| // return the device and queue affinity for the first device if there is only |
There was a problem hiding this comment.
Please review the comments in your PR to ensure they are properly punctuated complete sentences (here and in several other files).
There was a problem hiding this comment.
I did give it another pass, i hope i corrected everything.
| IREE::HAL::BufferUsageBitfield bufferUsage, OpBuilder &builder) { | ||
| // Emit a select op to let the runtime decide which device/queue affinity to | ||
| // use if required. | ||
| static std::tuple<SmallVector<Value>, SmallVector<Value>> |
There was a problem hiding this comment.
I'm not confident that resolving the devices this early is going to fully work with subsequent analysis, but we can give it a try!
Signed-off-by: Thomas Ziereis <[email protected]>
Signed-off-by: Thomas Ziereis <[email protected]>
|
Looks great! |
Refactors memory_types and buffer_usage to values from attributes. Progress towards #20856. This will make it easier to introduce the `hal.resolve_memory_properties` in a follow up PR. --------- Signed-off-by: default <[email protected]> Signed-off-by: Thomas Ziereis <[email protected]> Co-authored-by: Ben Vanik <[email protected]>
Refactors memory_types and buffer_usage to values from attributes. Progress towards #20856.
This will make it easier to introduce the
hal.resolve_memory_propertiesin a follow up PR.