You can find the CUDA kernels here 23, but they might not be straightforward to understand.
Here 17 are the CPU implementations, in case you want to also take a look at it.
I would personally recommend to write your experiments in a custom (Python) module first and verify the usability in a few experiments. A manual batchnorm implementation can be found here 15.