Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[softmax] Store full info about unpacked tensors in the problem descriptor #2813

Closed
atamazov opened this issue Mar 15, 2024 · 3 comments
Closed

Comments

@atamazov
Copy link
Contributor

Originated from: #2782 (comment)

Currently we do not store full information about unpacked tensors, only the flag. Also we do not store information about tensor layouts, at all. The above means that we'll need to extend the network config when support for unpacked tensors or support for different layouts is required.

If this is not done, then, for example, MIOpen won't be able to distinguish between two invokers when unpacked tensors are used (same NCHW but different strides).

Right now this only a potential problem. However, it will become real when/if we will support upacked tensors, or when/if or serialized softmax PD will be used as a key for the persistent databases (as this change in the db key will lead to backward incompatibility of the databases).

This could be resolved automatically by implementing #2812.


[Attribution] @junliume @JehandadKhan

@Pavanmahaveer7
Copy link

Hey HI team, I was reading about our documentation and ended up checking this. how are we finding out whether tensor is packed or unpacked , is by doing profiling or we are defining it when we are initializing the tensor, i mean like metadata . could you let me know ..

@DrizztDoUrden
Copy link
Contributor

@Pavanmahaveer7 An unpacked tensor has "holes" in its layout, which is defined by its strides. Right now the easiest way to check for that in the existing code is to compare the "size" of tensor (its dimensions multiplied) to its "space" (the total length of continuous memory required to store it). Both of them have existing methods in TesnsorDescriptor. If they are not equal, a tensor is considered unpacked. IIRC this is the exact way it is usually check in the library.

@Pavanmahaveer7
Copy link

Thank you Filippov for explaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants