Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] from_module #423

Merged
merged 1 commit into from
Jun 14, 2023
Merged

[Feature] from_module #423

merged 1 commit into from
Jun 14, 2023

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Jun 14, 2023

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 14, 2023
@vmoens vmoens merged commit 61cc530 into main Jun 14, 2023
@vmoens vmoens deleted the from_module branch June 14, 2023 15:14
@github-actions
Copy link

$\color{#D29922}\textsf{\Large⚠\kern{0.2cm}\normalsize Warning}$ Result of CPU Benchmark Tests

Total Benchmarks: 47. Improved: $\large\color{#35bf28}2$. Worsened: $\large\color{#d91a1a}3$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 1.1347ms 1.0988ms 910.1051 Ops/s 922.2474 Ops/s $\color{#d91a1a}-1.32\%$
test_creation 5.1741μs 4.6185μs 216.5206 KOps/s 223.5500 KOps/s $\color{#d91a1a}-3.14\%$
test_creation_empty 12.3071μs 11.5941μs 86.2506 KOps/s 86.8680 KOps/s $\color{#d91a1a}-0.71\%$
test_creation_nested_1 23.3742μs 22.3160μs 44.8108 KOps/s 43.6736 KOps/s $\color{#35bf28}+2.60\%$
test_creation_nested_2 23.1762μs 22.3730μs 44.6968 KOps/s 45.1399 KOps/s $\color{#d91a1a}-0.98\%$
test_clone 29.3043μs 27.6885μs 36.1160 KOps/s 36.3951 KOps/s $\color{#d91a1a}-0.77\%$
test_getitem[int] 34.9018μs 34.2667μs 29.1828 KOps/s 29.2220 KOps/s $\color{#d91a1a}-0.13\%$
test_getitem[slice_int] 73.3678μs 71.8097μs 13.9257 KOps/s 13.8696 KOps/s $\color{#35bf28}+0.40\%$
test_getitem[range] 80.6574μs 71.5272μs 13.9807 KOps/s 14.2273 KOps/s $\color{#d91a1a}-1.73\%$
test_getitem[tuple] 67.7067μs 66.9802μs 14.9298 KOps/s 14.8679 KOps/s $\color{#35bf28}+0.42\%$
test_getitem[list] 70.9251μs 63.2921μs 15.7998 KOps/s 16.0552 KOps/s $\color{#d91a1a}-1.59\%$
test_setitem_dim[int] 88.7010μs 48.8881μs 20.4549 KOps/s 21.0147 KOps/s $\color{#d91a1a}-2.66\%$
test_setitem_dim[slice_int] 0.1370ms 88.5308μs 11.2955 KOps/s 11.4450 KOps/s $\color{#d91a1a}-1.31\%$
test_setitem_dim[range] 0.1770ms 83.0475μs 12.0413 KOps/s 12.3485 KOps/s $\color{#d91a1a}-2.49\%$
test_setitem_dim[tuple] 0.1187ms 81.3728μs 12.2891 KOps/s 12.4169 KOps/s $\color{#d91a1a}-1.03\%$
test_setitem 36.2983μs 35.4549μs 28.2049 KOps/s 28.8541 KOps/s $\color{#d91a1a}-2.25\%$
test_set 35.5653μs 34.3079μs 29.1478 KOps/s 29.8493 KOps/s $\color{#d91a1a}-2.35\%$
test_set_shared 0.1655ms 0.1614ms 6.1962 KOps/s 6.1341 KOps/s $\color{#35bf28}+1.01\%$
test_update 38.8113μs 37.9263μs 26.3669 KOps/s 26.8743 KOps/s $\color{#d91a1a}-1.89\%$
test_update_nested 58.7815μs 57.7708μs 17.3098 KOps/s 17.6932 KOps/s $\color{#d91a1a}-2.17\%$
test_set_nested 46.7764μs 45.4529μs 22.0008 KOps/s 22.2920 KOps/s $\color{#d91a1a}-1.31\%$
test_set_nested_new 72.2196μs 63.2560μs 15.8088 KOps/s 15.8617 KOps/s $\color{#d91a1a}-0.33\%$
test_select 0.1027ms 0.1013ms 9.8691 KOps/s 9.9073 KOps/s $\color{#d91a1a}-0.39\%$
test_creation[device0] 1.3040ms 0.5077ms 1.9697 KOps/s 1.9795 KOps/s $\color{#d91a1a}-0.49\%$
test_creation_from_tensor 0.5938ms 0.4752ms 2.1044 KOps/s 1.8311 KOps/s $\textbf{\color{#35bf28}+14.92\%}$
test_add_one[memmap_tensor0] 50.2424μs 32.0546μs 31.1968 KOps/s 32.6436 KOps/s $\color{#d91a1a}-4.43\%$
test_contiguous[memmap_tensor0] 9.1671μs 8.6234μs 115.9638 KOps/s 122.6974 KOps/s $\textbf{\color{#d91a1a}-5.49\%}$
test_stack[memmap_tensor0] 0.1949ms 45.1104μs 22.1678 KOps/s 21.8100 KOps/s $\color{#35bf28}+1.64\%$
test_reshape_pytree 40.1583μs 37.4860μs 26.6766 KOps/s 27.2114 KOps/s $\color{#d91a1a}-1.97\%$
test_reshape_td 53.8254μs 51.3207μs 19.4853 KOps/s 19.8224 KOps/s $\color{#d91a1a}-1.70\%$
test_view_pytree 35.4713μs 34.4130μs 29.0588 KOps/s 29.7943 KOps/s $\color{#d91a1a}-2.47\%$
test_view_td 10.3511μs 9.3956μs 106.4330 KOps/s 106.2343 KOps/s $\color{#35bf28}+0.19\%$
test_unbind_pytree 39.5863μs 38.1147μs 26.2366 KOps/s 26.5942 KOps/s $\color{#d91a1a}-1.34\%$
test_unbind_td 0.1602ms 0.1582ms 6.3228 KOps/s 6.3850 KOps/s $\color{#d91a1a}-0.97\%$
test_split_pytree 46.5164μs 43.7675μs 22.8480 KOps/s 23.4621 KOps/s $\color{#d91a1a}-2.62\%$
test_split_td 0.1225ms 0.1197ms 8.3560 KOps/s 8.3537 KOps/s $\color{#35bf28}+0.03\%$
test_add_pytree 48.9304μs 46.9580μs 21.2956 KOps/s 21.6705 KOps/s $\color{#d91a1a}-1.73\%$
test_add_td 68.9096μs 67.2957μs 14.8598 KOps/s 15.4099 KOps/s $\color{#d91a1a}-3.57\%$
test_distributed 84.0010μs 84.0010μs 11.9046 KOps/s 11.0252 KOps/s $\textbf{\color{#35bf28}+7.98\%}$
test_tdmodule 52.2010μs 25.7224μs 38.8766 KOps/s 38.8361 KOps/s $\color{#35bf28}+0.10\%$
test_tdmodule_dispatch 63.2761ms 60.9826μs 16.3981 KOps/s 18.3233 KOps/s $\textbf{\color{#d91a1a}-10.51\%}$
test_tdseq 0.1974ms 36.3954μs 27.4760 KOps/s 27.8727 KOps/s $\color{#d91a1a}-1.42\%$
test_tdseq_dispatch 0.1084ms 65.0597μs 15.3705 KOps/s 15.7399 KOps/s $\color{#d91a1a}-2.35\%$
test_instantiation_functorch 1.7679ms 1.6348ms 611.7032 Ops/s 611.7552 Ops/s $-0.01\%$
test_instantiation_td 9.7576ms 1.3302ms 751.7859 Ops/s 806.6552 Ops/s $\textbf{\color{#d91a1a}-6.80\%}$
test_exec_functorch 0.2211ms 0.1882ms 5.3124 KOps/s 5.5084 KOps/s $\color{#d91a1a}-3.56\%$
test_exec_td 0.2338ms 0.2293ms 4.3604 KOps/s 4.4334 KOps/s $\color{#d91a1a}-1.65\%$

@github-actions
Copy link

$\color{#35bf28}\textsf{\Large✔\kern{0.2cm}\normalsize OK}$ Result of GPU Benchmark Tests

Total Benchmarks: 47. Improved: $\large\color{#35bf28}2$. Worsened: $\large\color{#d91a1a}0$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 0.9709ms 0.9363ms 1.0680 KOps/s 1.0805 KOps/s $\color{#d91a1a}-1.15\%$
test_creation 3.6510μs 3.3464μs 298.8302 KOps/s 305.1698 KOps/s $\color{#d91a1a}-2.08\%$
test_creation_empty 9.9811μs 9.4369μs 105.9676 KOps/s 109.3398 KOps/s $\color{#d91a1a}-3.08\%$
test_creation_nested_1 19.5522μs 17.0288μs 58.7239 KOps/s 58.7938 KOps/s $\color{#d91a1a}-0.12\%$
test_creation_nested_2 19.0902μs 18.2062μs 54.9262 KOps/s 56.8906 KOps/s $\color{#d91a1a}-3.45\%$
test_clone 23.9922μs 22.0893μs 45.2708 KOps/s 46.0923 KOps/s $\color{#d91a1a}-1.78\%$
test_getitem[int] 29.4497μs 26.9564μs 37.0970 KOps/s 38.5704 KOps/s $\color{#d91a1a}-3.82\%$
test_getitem[slice_int] 55.9646μs 55.2768μs 18.0908 KOps/s 18.4740 KOps/s $\color{#d91a1a}-2.07\%$
test_getitem[range] 66.8504μs 60.0661μs 16.6483 KOps/s 16.5989 KOps/s $\color{#35bf28}+0.30\%$
test_getitem[tuple] 51.3604μs 50.7206μs 19.7158 KOps/s 20.0609 KOps/s $\color{#d91a1a}-1.72\%$
test_getitem[list] 58.1859μs 53.9500μs 18.5357 KOps/s 18.9151 KOps/s $\color{#d91a1a}-2.01\%$
test_setitem_dim[int] 75.8010μs 39.7701μs 25.1445 KOps/s 25.2591 KOps/s $\color{#d91a1a}-0.45\%$
test_setitem_dim[slice_int] 0.1224ms 69.8120μs 14.3242 KOps/s 14.1471 KOps/s $\color{#35bf28}+1.25\%$
test_setitem_dim[range] 0.1717ms 69.6569μs 14.3561 KOps/s 14.1988 KOps/s $\color{#35bf28}+1.11\%$
test_setitem_dim[tuple] 0.1042ms 64.1177μs 15.5963 KOps/s 15.6210 KOps/s $\color{#d91a1a}-0.16\%$
test_setitem 28.6853μs 26.7483μs 37.3856 KOps/s 37.6244 KOps/s $\color{#d91a1a}-0.63\%$
test_set 28.0223μs 26.5055μs 37.7280 KOps/s 38.7140 KOps/s $\color{#d91a1a}-2.55\%$
test_set_shared 0.1684ms 0.1554ms 6.4342 KOps/s 6.4058 KOps/s $\color{#35bf28}+0.44\%$
test_update 35.1574μs 28.7180μs 34.8214 KOps/s 34.8853 KOps/s $\color{#d91a1a}-0.18\%$
test_update_nested 44.8125μs 43.4652μs 23.0069 KOps/s 23.0816 KOps/s $\color{#d91a1a}-0.32\%$
test_set_nested 35.2904μs 33.6524μs 29.7155 KOps/s 29.6570 KOps/s $\color{#35bf28}+0.20\%$
test_set_nested_new 48.6815μs 47.1057μs 21.2288 KOps/s 21.4069 KOps/s $\color{#d91a1a}-0.83\%$
test_select 87.0209μs 76.9395μs 12.9972 KOps/s 12.9996 KOps/s $\color{#d91a1a}-0.02\%$
test_creation[device0] 1.3579ms 0.5156ms 1.9395 KOps/s 1.9465 KOps/s $\color{#d91a1a}-0.36\%$
test_creation_from_tensor 0.6141ms 0.4849ms 2.0624 KOps/s 2.1294 KOps/s $\color{#d91a1a}-3.15\%$
test_add_one[memmap_tensor0] 34.6343μs 30.1681μs 33.1476 KOps/s 33.5154 KOps/s $\color{#d91a1a}-1.10\%$
test_contiguous[memmap_tensor0] 9.1501μs 8.2946μs 120.5610 KOps/s 118.7460 KOps/s $\color{#35bf28}+1.53\%$
test_stack[memmap_tensor0] 0.2010ms 45.0405μs 22.2022 KOps/s 20.8679 KOps/s $\textbf{\color{#35bf28}+6.39\%}$
test_reshape_pytree 30.7963μs 27.9534μs 35.7739 KOps/s 35.1849 KOps/s $\color{#35bf28}+1.67\%$
test_reshape_td 43.0054μs 39.9059μs 25.0589 KOps/s 25.5834 KOps/s $\color{#d91a1a}-2.05\%$
test_view_pytree 27.7283μs 26.3449μs 37.9580 KOps/s 37.8604 KOps/s $\color{#35bf28}+0.26\%$
test_view_td 7.8291μs 6.9894μs 143.0729 KOps/s 142.1389 KOps/s $\color{#35bf28}+0.66\%$
test_unbind_pytree 31.8233μs 30.0550μs 33.2723 KOps/s 32.8938 KOps/s $\color{#35bf28}+1.15\%$
test_unbind_td 0.1268ms 0.1233ms 8.1070 KOps/s 8.1774 KOps/s $\color{#d91a1a}-0.86\%$
test_split_pytree 35.5764μs 33.7727μs 29.6097 KOps/s 29.6261 KOps/s $\color{#d91a1a}-0.06\%$
test_split_td 0.1337ms 95.5305μs 10.4679 KOps/s 10.5603 KOps/s $\color{#d91a1a}-0.88\%$
test_add_pytree 40.3964μs 38.2378μs 26.1521 KOps/s 26.6602 KOps/s $\color{#d91a1a}-1.91\%$
test_add_td 55.7546μs 53.3869μs 18.7312 KOps/s 19.0850 KOps/s $\color{#d91a1a}-1.85\%$
test_distributed 98.0010μs 98.0010μs 10.2040 KOps/s 7.9364 KOps/s $\textbf{\color{#35bf28}+28.57\%}$
test_tdmodule 0.1459ms 21.7537μs 45.9692 KOps/s 45.0967 KOps/s $\color{#35bf28}+1.93\%$
test_tdmodule_dispatch 0.2185ms 47.2914μs 21.1455 KOps/s 20.9486 KOps/s $\color{#35bf28}+0.94\%$
test_tdseq 71.9010μs 29.5891μs 33.7963 KOps/s 33.5144 KOps/s $\color{#35bf28}+0.84\%$
test_tdseq_dispatch 0.2212ms 56.3091μs 17.7591 KOps/s 17.6208 KOps/s $\color{#35bf28}+0.78\%$
test_instantiation_functorch 1.3588ms 1.2792ms 781.7625 Ops/s 784.1495 Ops/s $\color{#d91a1a}-0.30\%$
test_instantiation_td 1.0585ms 0.9995ms 1.0005 KOps/s 1.0025 KOps/s $\color{#d91a1a}-0.21\%$
test_exec_functorch 0.1966ms 0.1553ms 6.4391 KOps/s 6.3648 KOps/s $\color{#35bf28}+1.17\%$
test_exec_td 0.1927ms 0.1876ms 5.3298 KOps/s 5.2121 KOps/s $\color{#35bf28}+2.26\%$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants