`dnnl::memory::desc::get_size()` returns 0 for submemory with non-zero offset
The root cause seems to be this commit.
Is there any reason why this is the behavior? It came as a surprise to me because it wasn't specified in the public API.
cc: @jacobkahn
Hi @StrongerXi, the reason is that submemory_desc in general case doesn't provide full information on how much memory to provide for the end user. Thus, it provides nothing. Thank you.
I see. Would you mind providing a quick example of such submemory_desc?
I can easily simulate get_size on my end, but I'm also using submemory_desc for tensor indexing (and eventually, in reorder primitive during indexed assignments) so I just want to make sure it's actually safe.