Deep Neural Network Library (DNNL) has a built-in benchmarking program call benchdnn.
For a complete description of the available options and working examples, see the https://github.com/intel/mkl-dnn/blob/master/tests/benchdnn/README.md "benchdnn readme".