dropout3d calls a method of _functions.dropout.FeatureDropout 4 which inherits from Dropout 4 which has a forward method.
According to the docs on extending PyTorch 9 you implement a custom function by creating a class with a forward method, and you use it by calling the apply method. Therefore, when dropout3d calls _functions.dropout.FeatureDropout.apply, we can assume that Dropout.forward gets run.
Therefore to write a custom version of dropout3d, you could copy the Dropout class from the above link and modify its forward method.