Ok, I can inspect sizes with (if dim() == 2):
(int64_t *)(*((c10::AlignedCharArray<8,8>*)&(*((c10::SmallVectorTemplateCommon<__int64,void>*)&(*((c10::SmallVectorTemplateBase<__int64,1>*)&(*((c10::SmallVectorImpl<__int64>*)&myTensor.impl_.target_->sizes_)))))).FirstEl)).buffer,2
Phew, what an ugly expression! IMHO this should be improved absolutely (at least in debug configuration).