nn.Embedding and padding index

Using nn.Embedding, what is the best way to manage the embedding for a padding index? I.e. set it to 0 and have its gradient always be 0.
Mentioned here https://github.com/apache/incubator-mxnet/issues/9257 and in some posts in the forum, but no mention of a clean way to do it.