SebastianBoblestETAS opened a new pull request, #11800:
URL: https://github.com/apache/tvm/pull/11800
This is a proposed change to the new topi x86 concat implementation in
#11341. It uses simple lists of int instead of `te.tensor.Tensor` for the array
offsets and loop variable extents. I have only looked at the generated C code
and made sure that the relevant unit tests pass.
New version:
```
for (int32_t j = 0; j < 4; ++j) {
concatenate_ext[j] = placeholder[j];
}
for (int32_t j1 = 0; j1 < 4; ++j1) {
concatenate_ext[(j1 + 4)] = placeholder1[j1];
}
return 0;
```
Old version:
```
void* const_vector_let = (&(global_workspace_6_var[64]));
void* cumsum_let = (&(global_workspace_6_var[48]));
for (int32_t i = 0; i < 2; ++i) {
((int64_t*)const_vector_let)[i] = ((i == 1) ? (int64_t)4 : ((i == 0) ?
(int64_t)4 : (int64_t)0));
}
for (int32_t i1 = 0; i1 < 2; ++i1) {
((int64_t*)cumsum_let)[i1] = ((i1 == 1) ? (int64_t)4 : (int64_t)0);
}
int64_t cumsum_let[2] = {0, 4};
for (int64_t j = 0; j < ((int64_t*)const_vector_let)[0]; ++j) {
concatenate_ext[(((int64_t*)cumsum_let)[0] + j)] = placeholder[j];
}
for (int64_t j1 = 0; j1 < ((int64_t*)const_vector_let)[1]; ++j1) {
concatenate_ext[(((int64_t*)cumsum_let)[1] + j1)] = placeholder1[j1];
}
return 0;
```
@DzAvril @shtinsa @MichaelJKlaiber @UlrikHjort-Bosch @vdkhoi @masahi
--
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]