[TOPI] Fix atlest1d for reduce and squeeze#2147
Conversation
[TOPI] Fix atlest1d for reduce and squeeze
| */ | ||
| // Enforce TOPI to use old behavior that reduces to at least 1d | ||
| #define TOPI_REDUCE_ATLEAST1D 1 | ||
| #define TOPI_OUTPUT_ATLEAST1D 1 |
There was a problem hiding this comment.
In my opinion, adding atleast1d is correct, but I don't see reasons for making its default values different in different object files. It takes time to understand that TOPI_OUTPUT_ATLEAST1D is defined above headers in two places with different values.
I would suggest to make atleast1d parameters with fixed default value of 0 to represent numpy-like behavior, but pass 1 to every call made from NNVM to keep backward compatibility.
Alternatively, one may define atleast1d without default value and let compiler point us all the places it should be set.
|
Thanks, @grwlf for the suggest, I agree you are right and have changed the code accordingly |
|
If |
No description provided.