Use dnnl::lstm_forward primitive on XPU for LSTM inference, providing
significant speedup over the per-timestep fused cell approach by
eliminating kernel launch overhead entirely.
Key changes:
- New aten/src/ATen/native/mkldnn/xpu/RNN.cpp implementing the oneDNN
LSTM primitive via REGISTER_XPU_DISPATCH(lstm_mkldnn_stub, ...) - Extended use_mkldnn() to return true for XPU in inference mode
- Added packed sequence unwrap: when batch_sizes are uniform (common in
batch=1 inference), reshape to regular 3D tensor and use oneDNN path - Added XPU-specific LSTMCell path with pre-computed input gates as
fallback for training or when oneDNN path is not applicable
The oneDNN primitive processes the entire sequence internally, avoiding
the O(T) kernel launches of the per-step approach.
Depends on intel/torch-xpu-ops#3770 for correct bias handling in the
fused LSTM cell fallback path.