Are the functions using some operations of the GPU?
Since CUDA calls are asynchronous, you should synchronize before calculating stopping the timer.
...
func1()
torch.cuda.synchronize()
end1 = time.time()
...