MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

Replacing vector with InlineVector in TensorDescriptor

Open novakovicdj opened this issue 11 months ago • 0 comments

This PR is replacing std::vector with InlineVector in TensorDescriptor for lens/strides. InlineVector https://github.com/ROCm/MIOpen/pull/3419

I did some performance testing to compare InlineVector with std::vector(initialization, elements access etc). The results are that InlineVector is ~6% faster than std::vector. For example initialization with 5 elements for InlineVector takes around 20.25ns, and initialization with 5 elements for std::vector takes around 21.85ns.

Based on these results I made changes in the code. I tried to make only necessary changes and to reduce overhead as much as possible (especially in the src/), also some changes needed to be made in InlineVector itself to be able to complete this change.

novakovicdj avatar Feb 12 '25 13:02 novakovicdj