Uh oh!
There was an error while loading. Please reload this page.
[AOT] Initial implementation of --unpacked-api - #8023
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
814ed20 to
40b964dCompareMousius
commented
May 24, 2021
@giuseros everythings back to green, could you take another look? 😸 |
giuseros
left a comment
There was a problem hiding this comment.
LGTM, only a very minor comment left for me
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Based on the discussions in the AOT embedded improvements RFC, this adds a flag to the target which changes the internal operators to an unpacked API. The unpacked API spreads the input buffers across the operator function, for example: int32_t operator(void* arg0, void* arg1); As opposed to the traditional packed API: int32_t operator(void** args); Uneffected is the entrypoint function, which retains a packed API for compatibility with other parts of TVM. This is done by changing the passes taken by none entrypoint (CallingConv::kEntryPoint) functions.
This removes the logic for deciding the entrypoint from the compiler passes and instead moves it into the metadata code generation. By moving the generation, we can generate a variety of entrypoints on top of the compiler output (such as the micro entrypoint discussed in the RFC).
(Also contains minor clean up of output variables)
(Also moves the entrypoint name to a constant)
9dcad5b to
d1e0ab2CompareMousius
commented
Jun 1, 2021
@areusch I think this is good to go, could you take another look? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Mousius
commented
Jun 3, 2021
@areusch I think I've incorporated all the changes and CI is still green 🎉 |
areusch
commented
Jun 4, 2021
thanks @Mousius, the PR is now merged! |
* [AOT] Initial implementation of --no-typed-operators Based on the discussions in the AOT embedded improvements RFC, this adds a flag to the target which changes the internal operators to an unpacked API. The unpacked API spreads the input buffers across the operator function, for example: int32_t operator(void* arg0, void* arg1); As opposed to the traditional packed API: int32_t operator(void** args); Uneffected is the entrypoint function, which retains a packed API for compatibility with other parts of TVM. This is done by changing the passes taken by none entrypoint (CallingConv::kEntryPoint) functions. * Move entrypoint generation outside of main passes This removes the logic for deciding the entrypoint from the compiler passes and instead moves it into the metadata code generation. By moving the generation, we can generate a variety of entrypoints on top of the compiler output (such as the micro entrypoint discussed in the RFC). * Use buffers in make_unpacked_api tests * Enable --no-typed-operators for llvm * Change --no-typed-operators to --typed-operators=0 to match other options * Refactor typed-operators lookup into use_typed_operators_ (Also contains minor clean up of output variables) * Rename --typed-operators to --unpacked-api (Also moves the entrypoint name to a constant) * Move all properties into init list to avoid double init * Remove AutoTVM breaking default and improve clarity
* [AOT] Initial implementation of --no-typed-operators Based on the discussions in the AOT embedded improvements RFC, this adds a flag to the target which changes the internal operators to an unpacked API. The unpacked API spreads the input buffers across the operator function, for example: int32_t operator(void* arg0, void* arg1); As opposed to the traditional packed API: int32_t operator(void** args); Uneffected is the entrypoint function, which retains a packed API for compatibility with other parts of TVM. This is done by changing the passes taken by none entrypoint (CallingConv::kEntryPoint) functions. * Move entrypoint generation outside of main passes This removes the logic for deciding the entrypoint from the compiler passes and instead moves it into the metadata code generation. By moving the generation, we can generate a variety of entrypoints on top of the compiler output (such as the micro entrypoint discussed in the RFC). * Use buffers in make_unpacked_api tests * Enable --no-typed-operators for llvm * Change --no-typed-operators to --typed-operators=0 to match other options * Refactor typed-operators lookup into use_typed_operators_ (Also contains minor clean up of output variables) * Rename --typed-operators to --unpacked-api (Also moves the entrypoint name to a constant) * Move all properties into init list to avoid double init * Remove AutoTVM breaking default and improve clarity
Based on the discussions in the AOT embedded improvements RFC, this adds a flag to the target which changes the internal operators to an unpacked API. The unpacked API spreads the input buffers across the operator function, for example:
As opposed to the traditional packed API:
Unaffected is the entrypoint function, which retains a packed API for compatibility with other parts of TVM. The entrypoint function is generated as part of the metadata as suggested by @tqchen so we can easily swap it for implementing
--micro-entrypoint.cc: @giuseros@mbaret@manupa-arm@areusch@tqchen