Multihead attention in pytorch

Multihead attention considers query, key and value. Please may I know which of these are updated during the backward pass?
Please help!