Skip to content

MIOpen Logger to Driver Decoding for Batch Normalization

daniellowell edited this page Sep 20, 2017 · 2 revisions

Example miopenBatchNormalizationForwardTraining log:

miopenStatus_t miopenBatchNormalizationForwardTraining(miopenHandle_t, miopenBatchNormMode_t, void *, void *, const miopenTensorDescriptor_t, const void *, const miopenTensorDescriptor_t, void *, const miopenTensorDescriptor_t, void *, void *, double, void *, void *, double, void *, void *){
bn_mode = 1
xDesc = 2, 4, 2, 2
x = 0xa09800500
yDesc = 2, 4, 2, 2
y = 0xa09800800
bnScaleBiasMeanVarDesc = 1, 4, 1, 1
bnScale = 0xa09800600
bnBias = 0xa09800700
expAvgFactor = 1
resultRunningMean = 0xa09800900
resultRunningVariance = 0xa09800a00
epsilon = 0.001
resultSaveMean = 0xa09800b00
resultSaveInvVariance = 0xa09800c00
}

The lines of interest are:

  • xDesc = 2, 4, 2, 2 --> -n 2 -c 4 -H 2 -W 2
  • resultSaveMean, resultSaveInvVariance (both non-NULL) --> -s 1
  • resultRunningMean, resultRunningVariance (both non-NULL) --> -r 1
  • bn_mode = 1 (this specifies SPATIAL mode) --> -m 1
./bin/MIOpenDriver bnorm -F 1 -n 2 -c 4 -H 2 -W 2 -m 1 -s 1 -r 1