Move the discussion here

> The things to be improved are
* Document the behavior independent of arg_binder.
  - Maps buffer[i][j][k] -> buffer[i][0][k] if dimension i's shape equals 0
* Debate on the name (auto broadcast?), enum vs string as type key
* Discuss how would the behavior affect topi implementation of broadcast and 
reduce ops
* Think about alternative implementations
  - Do we have to introduce stride?
  - e.g. j -> min(j, shape[ndim])
  - j -> j * scale(scale = 0 or 1)

Junru's comment,
> I do think it is proper to introduce stride. First, as far as we could see, 
> using strides does not seem to have too much overhead, compared with other 
> workarounds. Second, it seems to pave ways for other possible hacks to the 
> buffer.

`j -> min(j, shape[ndim])` seems to introduce overhead, IMO `j -> j * 
scale(scale = 0 or 1)` is equally good, while we need to think where to allow 
user specify the behavior, I feel implicitly inserting such scale will cause 
surprise.
I don't have preference between enum and string.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dmlc/tvm/issues/3390#issuecomment-503286893

Reply via email to