record unit time in torch.cuda.event (#15221)
authorKrishna Kalyan <krishnakalyan3@gmail.com>
Fri, 14 Dec 2018 23:24:45 +0000 (15:24 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Dec 2018 23:29:06 +0000 (15:29 -0800)
Summary: Record unit of time for torch.cuda.Event's elapsed_time

Differential Revision: D13467646

Pulled By: zou3519

fbshipit-source-id: 4f1f4ef5fa4bc5a1b4775dfcec6ab155e5bf8d6e

torch/cuda/streams.py

index 16c4153..62391a5 100644 (file)
@@ -192,7 +192,7 @@ class Event(object):
         return True
 
     def elapsed_time(self, end_event):
-        r"""Returns the time elapsed before the event was recorded."""
+        r"""Returns the time elapsed in milliseconds before the event was recorded."""
         time_ms = ctypes.c_float()
         check_error(cudart().cudaEventElapsedTime(
             ctypes.byref(time_ms), self, end_event))