shtinsa commented on PR #11800:
URL: https://github.com/apache/tvm/pull/11800#issuecomment-1163087935
Hello @masahi yes, I saw the const_matrix solution and it works on IR level,
but IMHO it looks like as workaround. I suppose it is necessary to extend the
codegen part to support `const_vector` with implementation of constexpr
analogue from c++17, but for the provided concatenation case it is enough to
have following code snippets:
`static const int cumsum_###[2] = {...};`
`static const int const_vector_###[2] = {...};`
where array sizes and and array internals should be formed during evaluation
of `const_vector` tensors, And they are known in case of static planning, for
the case with dynamic planning the concatenation code may have similar
structure and `cumsum_###` and `const_vector_###` should be formed for the
batch size 1, but during the execution stage the values from these arrays
should be scaled by batch size value.
These arrays will be moved to data section within the output so file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]