I don’t know if this is a bug because in your example outp is still in scope and should not be deleted.
However, it is interesting that the native implementation of softmax causes the computation to tie up more memory.