Most efficient way to calculate ROC-AUC in Trainings loop

Lets say I am training a Binary Classification and I want to calculate the ROC-AUC.
Whats the fastest, most efficient way to calculate the ROC_AUC see during training.
Assuming I am using the BCEWithLogitsLoss.