MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

Enable NCHW/NHWC and NCDHW/NDHWC layout in batch norm driver command

Open bghimireamd opened this issue 5 months ago • 0 comments

  • Enable NCHW/NHWC layout from driver command for batch norm.
  • Moved GpumemTensor to driver/driver.hpp
  • Stopped using old and slow miopenBNFwdTrainPerActivationRunHost, miopenBNFwdTrainSpatialRunHost, miopenBNFwdInferPerActivationRunHost, miopenBNFwdInferSpatialRunHost, miopenBNBwdPerActivationRunHost and miopenBNBwdSpatialRunHost since they only handled NCHW layout. Started using layout agnostic batch norm host function from test/fusionHost.hpp

eg:

./bin/MIOpenDriver bnorm -n 64 -c 1024 -H 14 -W 14 -m 1 --forw 1 -b 0 -s 0 -r 1 // defaults to NCHW

./bin/MIOpenDriver bnorm -n 64 -c 1024 -H 14 -W 14 -m 1 --forw 1 -b 0 -s 0 -r 1 -L NCHW ./bin/MIOpenDriver bnorm -n 64 -c 1024 -H 14 -W 14 -m 1 --forw 1 -b 0 -s 0 -r 1 -L NHWC ./bin/MIOpenDriver bnorm -n 64 -c 1024 -H 14 -W 14 -m 1 --forw 1 -b 0 -s 0 -r 1 --layout NHWC

bnorm, bnormfp16, bnormfp16fp32, bnormbfp16fp32,

3D

./bin/MIOpenDriver bnorm -n 8 -c 8 -H 12 -W 12 -D12 -m 1 --forw 0 -b 1 -s 1 -r 1 --layout NDHWC

bghimireamd avatar Sep 04 '24 14:09 bghimireamd