Repository navigation
Use generated function to compute number of workgroups to be launched. - #3095
Conversation
benvanik
left a comment
There was a problem hiding this comment.
Hmm this has an design issue - all of the new result num/operand num/etc attributes cannot exist. The interface bindings are not 1:1 with function operands/results. The signature on the entry point is informational only and cannot be used to reverse the mapping.
There shouldn't be any need to do that, but I'm having trouble finding where in the code the false requirement snuck in.
|
The operand_num/result_num are not on the interface (since each binding might be for multiple values). They are just on the load/store/placeholder ops. This way I can map back to the Operands/Results of the DispatchState. Happy to try a better way. Lets chat offline. |
|
Please hold off on review for a bit. Going to be pushing some changes that needs some cleanup (comments, documentation, etc.) |
24efc93 to
2caad4a
Compare
|
This is now ready for review. |
2caad4a to
1939b1c
Compare
|
Thanks for the review! |
1939b1c to
3b3ea08
Compare
3b3ea08 to
043035c
Compare
043035c to
7d759d3
Compare
The current mechanism of deciding number of workgroups to use for the launch uses an enumeration of fixed strategies. This is not sufficient to cover all uses. This commit adds a new mechanism where the codegeneration passes generate the function to use that when called from the host side will return the number of workgroups to use. The arguments to the function are the shapes of the inputs and outputs to the dispatch region. Currently this is enabled only for static shapes, since there are some unresolved issues w.r.t to the dynamic shape case.
7d759d3 to
0401200
Compare
iree-org#3095) The current mechanism of deciding number of workgroups to use for the launch uses an enumeration of fixed strategies. This is not sufficient to cover all uses. This commit adds a new mechanism where the codegeneration passes generate the function to use that when called from the host side will return the number of workgroups to use. The arguments to the function are the shapes of the inputs and outputs to the dispatch region. Currently this is enabled only for static shapes, since there are some unresolved issues w.r.t to the dynamic shape case.
* 903f809 Script to update to llvm syncpoint (#3155) * a398c96 Translate VM Function to C Code (#2842) * f941efb Multistage docker containers with RBE swiftshader support (#3065) * b7d5710 [spirv] Extract common SPIR-V target functionalities out (NFC) (#3140) * f5fe759 Use generated function to compute number of workgroups to be launched. (#3095) * b89191c Merge google -> main (#3143) COPYBARA_INTEGRATE_REVIEW=#3160 from ScottTodd:main-to-google 903f809 PiperOrigin-RevId: 331891580
* 903f809 Script to update to llvm syncpoint (#3155) * a398c96 Translate VM Function to C Code (#2842) * f941efb Multistage docker containers with RBE swiftshader support (#3065) * b7d5710 [spirv] Extract common SPIR-V target functionalities out (NFC) (#3140) * f5fe759 Use generated function to compute number of workgroups to be launched. (#3095) * b89191c Merge google -> main (#3143) COPYBARA_INTEGRATE_REVIEW=#3160 from ScottTodd:main-to-google 903f809 PiperOrigin-RevId: 331891580
The current mechanism of deciding number of workgroups to use for the
launch uses an enumeration of fixed strategies. This is not sufficient
to cover all uses. This commit adds a new mechanism where the
codegeneration passes generate the function to use that when called
from the host side will return the number of workgroups to use. The
arguments to the function are the shapes of the inputs and outputs to
the dispatch region.
Currently this is enabled only for static shapes, since there are some
unresolved issues w.r.t to the dynamic shape case.