I actually ran my code with torch.cuda.synchronize() but was missing the ones that come after the function, before the second time such as the following,

torch.cuda.synchronize()
init_time=time.perf_counter()
outputs = self.net(x)
end_time=time.perf_counter()
print(‘Forward: {:.3f}s’.format(end_time-init_time))
When I either use  torch.cuda.synchronize() before timing the end_time or using CUDA_LAUNCH_BLOCKING=1 the times sum up to the Entire_Detection time,though,the Entire_Detection time increase by around 30% and the Forward function consumes most of the time.When the Forward function runs asynchronized it takes as mentioned above 0.008 seconds,around 4-5 times slower
appreciated,