XNNPACK icon indicating copy to clipboard operation
XNNPACK copied to clipboard

XNN_FLAG_KEEP_DIM not backwards compatible

Open mcr229 opened this issue 11 months ago • 1 comments

Commit: https://github.com/google/XNNPACK/commit/23f386b5d7eca18cb98659f84483cd8f20662251

Introduces the XNN_FLAG_KEEP_DIM flag which makes global_sum_pooling, global_average_pooling, and static mean no longer backwards compatible. That is calls previously to

xnn_define_global_average_pooling will reduce dims, when previous to this commit they would not. I would like to suggest that this flag be changed to XNN_FLAG_REDUCE_DIMS. This way previous calls to global_sum_pooling, global_average_pooling, and static mean is not changed(keep dim is on by deafult) , and instead we opt-in to reducing dims with this flag.

PR for change is here: https://github.com/google/XNNPACK/pull/6089

mcr229 avatar Feb 27 '24 23:02 mcr229

hi @alankelly, I noticed that these changes were rolled back. Is that the intention for the future going forward? Just want to know now to understand whether or not the commit with flag_reduce_dims is stable or not.

mcr229 avatar Mar 14 '24 05:03 mcr229

Sorry for the mess with this. This flag should have been XNN_FLAG_REDUCE_DIMS to maintain behaviour. However, before we could roll it back it got picked up by other projects. We aim to keep the subgraph API stable, but this slipped through accidentally.

alankelly avatar Jul 11 '24 13:07 alankelly