)]}'
{
  "commit": "4606deb2beb818ce53fe291d1afce917498df181",
  "tree": "b709bdc6476c7553f49a654d35c83a95759236c5",
  "parents": [
    "d00579da938ecee18743ead0ee89fefa5e97b108"
  ],
  "author": {
    "name": "Hong Xu",
    "email": "hong@topbug.net",
    "time": "Sat Nov 09 09:09:50 2019 -0800"
  },
  "committer": {
    "name": "Facebook Github Bot",
    "email": "facebook-github-bot@users.noreply.github.com",
    "time": "Sat Nov 09 09:11:45 2019 -0800"
  },
  "message": "Migrate frac from TH to ATen (CUDA) (#28953)\n\nSummary:\nPull Request resolved: https://github.com/pytorch/pytorch/pull/28953\n\nClose #24566\n\nBenchmark (Debian Buster, CUDA 9.2, Quadro P400, turbo off, Release, gcc\n7.4):\n\n```python\nimport timeit\n\nfor n, t in [(10_000, 20000),\n             (100_000, 20000)]:\n    for dtype in (\u0027torch.half\u0027, \u0027torch.float\u0027, \u0027torch.double\u0027):\n        print(f\u0027torch.frac(a) a.numel() \u003d\u003d {n} for {t} times {dtype}\u0027)\n        print(timeit.timeit(f\u0027torch.frac(a); torch.cuda.synchronize()\u0027, setup\u003df\u0027import torch; a\u003dtorch.arange({n}, dtype\u003d{dtype}, device\u003d\"cuda\")\u0027, number\u003dt))\n```\n\nBefore:\n\n```\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.half\n0.3608182370007853\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.float\n0.3647012189976522\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.double\n0.3889585220022127\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.half\n0.622635444997286\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.float\n0.9595754649999435\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.double\n1.5590267750012572\n```\n\nAfter:\n\n```\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.half\n0.3675256470014574\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.float\n0.3703597319981782\ntorch.frac(a) a.numel() \u003d\u003d 10000 for 20000 times torch.double\n0.372184894993552\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.half\n0.60767333900003\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.float\n0.9645607889979146\ntorch.frac(a) a.numel() \u003d\u003d 100000 for 20000 times torch.double\n1.5542530329985311\n```\n\nTest Plan: Imported from OSS\n\nDifferential Revision: D18302768\n\nPulled By: VitalyFedyunin\n\nfbshipit-source-id: 24198838dc903d455155f0819d0c7d58974aaecd\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6e61722ec4c945806976f7c82c571258683ce1a7",
      "old_mode": 33188,
      "old_path": "aten/src/ATen/Declarations.cwrap",
      "new_id": "1483faaf6ea5ccdfd279a73c082481b7e26408f6",
      "new_mode": 33188,
      "new_path": "aten/src/ATen/Declarations.cwrap"
    },
    {
      "type": "modify",
      "old_id": "f16d155e85aff7d6ed4d953170a8e4028a63ce58",
      "old_mode": 33188,
      "old_path": "aten/src/ATen/native/UnaryOps.cpp",
      "new_id": "151690ace419a39a144effabc0e03418803a7930",
      "new_mode": 33188,
      "new_path": "aten/src/ATen/native/UnaryOps.cpp"
    },
    {
      "type": "modify",
      "old_id": "d2cc33b721faf3c0de8857ca9c850080cae90ae9",
      "old_mode": 33188,
      "old_path": "aten/src/ATen/native/cuda/CUDAUnaryOps.cpp",
      "new_id": "f6dd50a94d02a3a0938be5e21b59c8b5beb503b6",
      "new_mode": 33188,
      "new_path": "aten/src/ATen/native/cuda/CUDAUnaryOps.cpp"
    },
    {
      "type": "modify",
      "old_id": "2e29da5b78fdf75d3ba48b9314df126ce9b1a4c1",
      "old_mode": 33188,
      "old_path": "aten/src/ATen/native/cuda/UnaryOpsKernel.cu",
      "new_id": "5636165923e9400920cd88018da2cd0864010b1b",
      "new_mode": 33188,
      "new_path": "aten/src/ATen/native/cuda/UnaryOpsKernel.cu"
    },
    {
      "type": "modify",
      "old_id": "0c4ca7bd20ef4f4addfc615b8893aab8c901f693",
      "old_mode": 33188,
      "old_path": "aten/src/ATen/native/native_functions.yaml",
      "new_id": "8ee42e7b82a548db6382251f99b9c1d324497f84",
      "new_mode": 33188,
      "new_path": "aten/src/ATen/native/native_functions.yaml"
    },
    {
      "type": "modify",
      "old_id": "033149de505be9d9e36f4e045e6ee4ccd65f4b03",
      "old_mode": 33188,
      "old_path": "aten/src/TH/THMath.h",
      "new_id": "afda8865093e24edd50d215619f61ec2850ff533",
      "new_mode": 33188,
      "new_path": "aten/src/TH/THMath.h"
    },
    {
      "type": "modify",
      "old_id": "b121ef6efdde8341a3205a4577b3d3edc54f38de",
      "old_mode": 33188,
      "old_path": "aten/src/TH/generic/THTensorMath.h",
      "new_id": "751b76db7926b482b5546947439ae1917b9e050a",
      "new_mode": 33188,
      "new_path": "aten/src/TH/generic/THTensorMath.h"
    },
    {
      "type": "modify",
      "old_id": "4e455a252c43cc6b04a467a587069fcb457316b2",
      "old_mode": 33188,
      "old_path": "aten/src/TH/generic/THTensorMoreMath.cpp",
      "new_id": "d123dd91d1646197bc434ab352c04c4a7badc1b1",
      "new_mode": 33188,
      "new_path": "aten/src/TH/generic/THTensorMoreMath.cpp"
    },
    {
      "type": "modify",
      "old_id": "e3d96e92d93cb5ad49aec745c0c3c0f5d0b9bbeb",
      "old_mode": 33188,
      "old_path": "aten/src/TH/generic/THVector.h",
      "new_id": "61f2f0da8eb92bc9dbb0149798d099e7b8c2b8b6",
      "new_mode": 33188,
      "new_path": "aten/src/TH/generic/THVector.h"
    },
    {
      "type": "modify",
      "old_id": "4a65e9f35de25d5b4347c39a5d64ca30af47927e",
      "old_mode": 33188,
      "old_path": "aten/src/TH/generic/THVectorDefault.cpp",
      "new_id": "a14f59de0a7d14ebb59a6df2f21d2413d7629783",
      "new_mode": 33188,
      "new_path": "aten/src/TH/generic/THVectorDefault.cpp"
    },
    {
      "type": "modify",
      "old_id": "11077c5f1354b33b9b4466f3b8d2fc7ac163faab",
      "old_mode": 33188,
      "old_path": "aten/src/THC/THCNumerics.cuh",
      "new_id": "832aa6f9cfa6537006416c905f070b02c50a3765",
      "new_mode": 33188,
      "new_path": "aten/src/THC/THCNumerics.cuh"
    },
    {
      "type": "modify",
      "old_id": "acdc8bca2be01876fa2e751671434cad510eb843",
      "old_mode": 33188,
      "old_path": "aten/src/THC/generic/THCTensorMathPointwise.cu",
      "new_id": "e90311a2be7e02c979fa7f382e65be9ca5754932",
      "new_mode": 33188,
      "new_path": "aten/src/THC/generic/THCTensorMathPointwise.cu"
    },
    {
      "type": "modify",
      "old_id": "2886d2f96d8ae16e747d909fe5aea136d5fc9330",
      "old_mode": 33188,
      "old_path": "aten/src/THC/generic/THCTensorMathPointwise.h",
      "new_id": "18a331924ef90bb900fc2e817bd66f85ba6eba6b",
      "new_mode": 33188,
      "new_path": "aten/src/THC/generic/THCTensorMathPointwise.h"
    },
    {
      "type": "modify",
      "old_id": "856130733b43e7da70990e60f627e30ec11c3636",
      "old_mode": 33188,
      "old_path": "test/test_torch.py",
      "new_id": "849e8b0c21c91d2af59588bfb7c3497d6e87142b",
      "new_mode": 33188,
      "new_path": "test/test_torch.py"
    }
  ]
}
