Yeah, so two things

operations of 1-3 elements are generally rather expensive in PyTorch as the overhead of Tensor creation becomes significant (this includes setting single elements), I think this is the main thing here. This is also the reason why the JIT doesn’t help a whole lot (it only takes away the Python overhead) and Numby shines (where e.g. the assignment to depth_array[i] is just a memory write).
the matmul itself might differ in speed if you have different BLAS backends for it in PyTorch vs. NumPy.

In this specific case, you could likely just do depth_array = torch.matmul(pnt_cloud, T.t()).clamp_(min=0) or so. Similarly in numpy.
Best regards
Thomas
(PS: it would help if you just added dummy data to your code examples so people could just copypaste to look into the benchmarking.)