Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gautamborad/1605cdf7d8857a9de76179644b9f13d5 to your computer and use it in GitHub Desktop.
Save gautamborad/1605cdf7d8857a9de76179644b9f13d5 to your computer and use it in GitHub Desktop.
BEFORE CODE CHANGES
====================================
TorchScript one_d time for torch.uint8: (0.00162s)!
TorchScript two_d time for torch.uint8: (0.00019s)!
TorchScript three_d time for torch.uint8: (0.00024s)!
TorchScript four_d time for torch.uint8: (0.00071s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int8: (0.00017s)!
TorchScript two_d time for torch.int8: (0.00019s)!
TorchScript three_d time for torch.int8: (0.00025s)!
TorchScript four_d time for torch.int8: (0.00070s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int16: (0.00018s)!
TorchScript two_d time for torch.int16: (0.00018s)!
TorchScript three_d time for torch.int16: (0.00024s)!
TorchScript four_d time for torch.int16: (0.00108s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int32: (0.00019s)!
TorchScript two_d time for torch.int32: (0.00018s)!
TorchScript three_d time for torch.int32: (0.00024s)!
TorchScript four_d time for torch.int32: (0.00071s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int64: (0.00015s)!
TorchScript two_d time for torch.int64: (0.00018s)!
TorchScript three_d time for torch.int64: (0.00024s)!
TorchScript four_d time for torch.int64: (0.00071s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.float32: (0.00016s)!
TorchScript two_d time for torch.float32: (0.00021s)!
TorchScript three_d time for torch.float32: (0.00023s)!
TorchScript four_d time for torch.float32: (0.00030s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.float64: (0.00012s)!
TorchScript two_d time for torch.float64: (0.00016s)!
TorchScript three_d time for torch.float64: (0.00035s)!
TorchScript four_d time for torch.float64: (0.00028s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.float16: (0.00016s)!
TorchScript two_d time for torch.float16: (0.00019s)!
TorchScript three_d time for torch.float16: (0.00023s)!
TorchScript four_d time for torch.float16: (0.00030s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.bfloat16: (0.00017s)!
TorchScript two_d time for torch.bfloat16: (0.00026s)!
TorchScript three_d time for torch.bfloat16: (0.00025s)!
TorchScript four_d time for torch.bfloat16: (0.00045s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.complex64: (0.00035s)!
TorchScript three_d time for torch.complex64: (0.000s)!
TorchScript four_d time for torch.complex64: (0.00030s)!
TorchScript one_d time for torch.complex128: (0.00023s)!
TorchScript four_d time for torch.complex128: (0.00029s)!
AFTER CODE CHANGES
====================================
TorchScript one_d time for torch.uint8: (0.00517s)!
TorchScript two_d time for torch.uint8: (0.00068s)!
TorchScript three_d time for torch.uint8: (0.00044s)!
TorchScript four_d time for torch.uint8: (0.00145s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int8: (0.00020s)!
TorchScript two_d time for torch.int8: (0.00023s)!
TorchScript three_d time for torch.int8: (0.00028s)!
TorchScript four_d time for torch.int8: (0.00090s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int16: (0.00085s)!
TorchScript two_d time for torch.int16: (0.00027s)!
TorchScript three_d time for torch.int16: (0.00030s)!
TorchScript four_d time for torch.int16: (0.00090s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int32: (0.00036s)!
TorchScript two_d time for torch.int32: (0.00060s)!
TorchScript three_d time for torch.int32: (0.00035s)!
TorchScript four_d time for torch.int32: (0.00106s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.int64: (0.00015s)!
TorchScript two_d time for torch.int64: (0.00020s)!
TorchScript three_d time for torch.int64: (0.00028s)!
TorchScript four_d time for torch.int64: (0.00099s)!
-------------------------------------------------------------------
TorchScript four_d time for torch.float32: (0.00038s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.float64: (0.00014s)!
TorchScript two_d time for torch.float64: (0.00018s)!
TorchScript three_d time for torch.float64: (0.00027s)!
TorchScript four_d time for torch.float64: (0.00035s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.float16: (0.00018s)!
TorchScript two_d time for torch.float16: (0.00027s)!
TorchScript three_d time for torch.float16: (0.00028s)!
TorchScript four_d time for torch.float16: (0.00040s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.bfloat16: (0.00018s)!
TorchScript two_d time for torch.bfloat16: (0.00021s)!
TorchScript three_d time for torch.bfloat16: (0.00026s)!
TorchScript four_d time for torch.bfloat16: (0.00060s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.complex64: (0.00140s)!
TorchScript two_d time for torch.complex64: (0.00023s)!
TorchScript three_d time for torch.complex64: (0.000s)!
TorchScript four_d time for torch.complex64: (0.00047s)!
-------------------------------------------------------------------
TorchScript one_d time for torch.complex128: (0.00050s)!
TorchScript two_d time for torch.complex128: (0.00023s)!
TorchScript three_d time for torch.complex128: (0.000s)!
TorchScript four_d time for torch.complex128: (0.00034s)!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment