Update profile() for CUDA Memory allocation (#4239)

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Update profile()

* Cleanup
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-07-30 18:17:19 +02:00
1 parent bceb57b910
commit d8f18834a2
2 files changed
+45 -31

No files matched your search

+2 -2
View File
@@ -1172,11 +1172,11 @@
},
"source": [
"# Profile\n",
"from utils.torch_utils import profile \n",
"from utils.torch_utils import profile\n",
"\n",
"m1 = lambda x: x * torch.sigmoid(x)\n",
"m2 = torch.nn.SiLU()\n",
"profile(x=torch.randn(16, 3, 640, 640), ops=[m1, m2], n=100)"
"results = profile(input=torch.randn(16, 3, 640, 640), ops=[m1, m2], n=100)"
],
"execution_count": null,
"outputs": []