We reserve the wrong size for the rtas cmd cache vector. Since we cache the addresses of rtas as we populate the vector, this results in the vector getting resized/reallocated, invalidating our cached addresses.
What's changed
Calculate the actual size needed for the cached vector instead of approximating. Add a TT_ASSERT to make sure we have a clear error message if this ever happens again instead of segfaulting.
Ticket
https://github.com/tenstorrent/tt-metal/issues/15263
Problem description
We reserve the wrong size for the rtas cmd cache vector. Since we cache the addresses of rtas as we populate the vector, this results in the vector getting resized/reallocated, invalidating our cached addresses.
What's changed
Calculate the actual size needed for the cached vector instead of approximating. Add a TT_ASSERT to make sure we have a clear error message if this ever happens again instead of segfaulting.
Checklist