Some underlying backends allocate the full-sequence output tensor internally regardless of the returnSequence flag but do not validate its size, which might cause an out-of-bounds write. We should always validate the full-sequence output descriptor [steps, numDirections, batchSize, hiddenSize] so that oversized shapes are rejected before reaching the backend.
Some underlying backends allocate the full-sequence output tensor internally regardless of the
returnSequenceflag but do not validate its size, which might cause an out-of-bounds write. We should always validate the full-sequence output descriptor [steps, numDirections, batchSize, hiddenSize] so that oversized shapes are rejected before reaching the backend.