Closed
Description
baddbmm requires the input tensors must be broadcastable. But DNNL does not support this case. So if the shape of the input tensor does not meet the requirement, the dnnl baddbmm will output random results.
torch.baddbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None) → Tensor
For example, If batch1 is a (b * n * m) tensor, batch2 is a (b * m * p) tensor, but input is a (n * p) tensor, then the baddbmm will output incorrect result. Actually, the input should be a (b * n * p) tensor.