The max. absolute error for the FP32 implementation is tensor(8.3447e-07, grad_fn=<MaxBackward1>) on my system, which would be explained by the limited floating point precision.
I don’t know which path is taken for FP64 on the CPU, but assume that less or no optimizations are applied internally, which could explain the 0 difference.