Well, you can’t avoid merging memory blocks. Pre gradient flow you can sometimes pre-allocate a joined buffer and write to it part by part, e.g. randn(3, out=x[:3]), x[:3].normal_(), x[:3].fill_(0.1) etc.
If you do “multiple branches”, it is usually slower than straightforward memory consolidation with cat().