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] Module serialization #396

Merged
merged 1 commit into from
May 25, 2023
Merged

[Feature] Module serialization #396

merged 1 commit into from
May 25, 2023

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented May 25, 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 May 25, 2023
@vmoens vmoens added bug Something isn't working enhancement New feature or request labels May 25, 2023
Copy link
Contributor

@tcbegley tcbegley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vmoens vmoens merged commit a09a052 into main May 25, 2023
@vmoens vmoens deleted the pickle_lambda branch May 25, 2023 17:05
@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}1$. Worsened: $\large\color{#d91a1a}2$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 1.2603ms 1.2215ms 818.6421 Ops/s 813.3087 Ops/s $\color{#35bf28}+0.66\%$
test_creation 4.4181μs 4.1240μs 242.4854 KOps/s 236.0286 KOps/s $\color{#35bf28}+2.74\%$
test_creation_empty 17.7773μs 16.5349μs 60.4783 KOps/s 61.3197 KOps/s $\color{#d91a1a}-1.37\%$
test_creation_nested_1 29.7065μs 28.6878μs 34.8580 KOps/s 34.2405 KOps/s $\color{#35bf28}+1.80\%$
test_creation_nested_2 30.5575μs 29.0596μs 34.4121 KOps/s 34.0938 KOps/s $\color{#35bf28}+0.93\%$
test_clone 27.4525μs 26.3446μs 37.9584 KOps/s 37.9985 KOps/s $\color{#d91a1a}-0.11\%$
test_getitem[int] 32.7147μs 32.1740μs 31.0810 KOps/s 31.2750 KOps/s $\color{#d91a1a}-0.62\%$
test_getitem[slice_int] 74.5002μs 68.1020μs 14.6839 KOps/s 14.8964 KOps/s $\color{#d91a1a}-1.43\%$
test_getitem[range] 70.5634μs 69.6000μs 14.3678 KOps/s 14.5754 KOps/s $\color{#d91a1a}-1.42\%$
test_getitem[tuple] 63.2736μs 62.7013μs 15.9486 KOps/s 16.1464 KOps/s $\color{#d91a1a}-1.22\%$
test_getitem[list] 62.1988μs 61.6060μs 16.2322 KOps/s 16.4203 KOps/s $\color{#d91a1a}-1.15\%$
test_setitem_dim[int] 80.7010μs 45.6294μs 21.9157 KOps/s 22.6861 KOps/s $\color{#d91a1a}-3.40\%$
test_setitem_dim[slice_int] 0.1858ms 81.8866μs 12.2120 KOps/s 12.3437 KOps/s $\color{#d91a1a}-1.07\%$
test_setitem_dim[range] 0.1558ms 77.6173μs 12.8837 KOps/s 13.1778 KOps/s $\color{#d91a1a}-2.23\%$
test_setitem_dim[tuple] 0.1657ms 74.9000μs 13.3511 KOps/s 13.6977 KOps/s $\color{#d91a1a}-2.53\%$
test_setitem 39.6437μs 38.5731μs 25.9248 KOps/s 26.1786 KOps/s $\color{#d91a1a}-0.97\%$
test_set 43.5957μs 38.2911μs 26.1157 KOps/s 26.9179 KOps/s $\color{#d91a1a}-2.98\%$
test_set_shared 0.1781ms 0.1739ms 5.7521 KOps/s 5.6799 KOps/s $\color{#35bf28}+1.27\%$
test_update 48.2738μs 47.2746μs 21.1530 KOps/s 21.2266 KOps/s $\color{#d91a1a}-0.35\%$
test_update_nested 69.0952μs 68.0349μs 14.6983 KOps/s 14.8922 KOps/s $\color{#d91a1a}-1.30\%$
test_set_nested 48.0908μs 46.9877μs 21.2822 KOps/s 21.3407 KOps/s $\color{#d91a1a}-0.27\%$
test_set_nested_new 67.1882μs 65.3337μs 15.3060 KOps/s 15.3615 KOps/s $\color{#d91a1a}-0.36\%$
test_select 0.1047ms 0.1031ms 9.6968 KOps/s 9.7290 KOps/s $\color{#d91a1a}-0.33\%$
test_creation[device0] 1.8891ms 0.5613ms 1.7815 KOps/s 1.8094 KOps/s $\color{#d91a1a}-1.54\%$
test_creation_from_tensor 0.5709ms 0.4615ms 2.1670 KOps/s 2.1543 KOps/s $\color{#35bf28}+0.59\%$
test_add_one[memmap_tensor0] 33.2036μs 30.0215μs 33.3095 KOps/s 33.0157 KOps/s $\color{#35bf28}+0.89\%$
test_contiguous[memmap_tensor0] 8.4591μs 7.9682μs 125.4986 KOps/s 126.3449 KOps/s $\color{#d91a1a}-0.67\%$
test_stack[memmap_tensor0] 0.1831ms 42.9207μs 23.2988 KOps/s 22.8255 KOps/s $\color{#35bf28}+2.07\%$
test_reshape_pytree 38.5577μs 35.7967μs 27.9356 KOps/s 27.9865 KOps/s $\color{#d91a1a}-0.18\%$
test_reshape_td 50.6929μs 48.2861μs 20.7099 KOps/s 20.5495 KOps/s $\color{#35bf28}+0.78\%$
test_view_pytree 33.8366μs 32.7132μs 30.5687 KOps/s 29.8210 KOps/s $\color{#35bf28}+2.51\%$
test_view_td 9.9452μs 8.9233μs 112.0656 KOps/s 112.1258 KOps/s $\color{#d91a1a}-0.05\%$
test_unbind_pytree 37.5386μs 36.0784μs 27.7174 KOps/s 27.2725 KOps/s $\color{#35bf28}+1.63\%$
test_unbind_td 0.1926ms 0.1895ms 5.2757 KOps/s 5.3567 KOps/s $\color{#d91a1a}-1.51\%$
test_split_pytree 43.8508μs 41.8971μs 23.8680 KOps/s 24.0794 KOps/s $\color{#d91a1a}-0.88\%$
test_split_td 0.1331ms 0.1161ms 8.6145 KOps/s 8.7571 KOps/s $\color{#d91a1a}-1.63\%$
test_add_pytree 46.7198μs 44.9803μs 22.2320 KOps/s 22.0633 KOps/s $\color{#35bf28}+0.76\%$
test_add_td 79.7974μs 77.7037μs 12.8694 KOps/s 13.1863 KOps/s $\color{#d91a1a}-2.40\%$
test_distributed 73.6010μs 73.6010μs 13.5868 KOps/s 11.6549 KOps/s $\textbf{\color{#35bf28}+16.58\%}$
test_tdmodule 71.0010μs 28.2020μs 35.4585 KOps/s 35.2193 KOps/s $\color{#35bf28}+0.68\%$
test_tdmodule_dispatch 62.6280ms 66.9110μs 14.9452 KOps/s 16.2392 KOps/s $\textbf{\color{#d91a1a}-7.97\%}$
test_tdseq 0.5931ms 39.6816μs 25.2006 KOps/s 25.7956 KOps/s $\color{#d91a1a}-2.31\%$
test_tdseq_dispatch 0.1265ms 70.4221μs 14.2001 KOps/s 14.0889 KOps/s $\color{#35bf28}+0.79\%$
test_instantiation_functorch 1.6438ms 1.5672ms 638.0701 Ops/s 644.5778 Ops/s $\color{#d91a1a}-1.01\%$
test_instantiation_td 8.2483ms 1.2727ms 785.7163 Ops/s 828.2322 Ops/s $\textbf{\color{#d91a1a}-5.13\%}$
test_exec_functorch 0.1842ms 0.1796ms 5.5667 KOps/s 5.4787 KOps/s $\color{#35bf28}+1.61\%$
test_exec_td 0.3322ms 0.3274ms 3.0539 KOps/s 3.0480 KOps/s $\color{#35bf28}+0.20\%$

@github-actions
Copy link

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

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

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 1.9173ms 1.6644ms 600.8341 Ops/s 603.2992 Ops/s $\color{#d91a1a}-0.41\%$
test_creation 6.3230μs 4.2827μs 233.4959 KOps/s 262.6970 KOps/s $\textbf{\color{#d91a1a}-11.12\%}$
test_creation_empty 27.6541μs 18.3744μs 54.4236 KOps/s 59.9746 KOps/s $\textbf{\color{#d91a1a}-9.26\%}$
test_creation_nested_1 41.6882μs 32.2706μs 30.9879 KOps/s 32.7845 KOps/s $\textbf{\color{#d91a1a}-5.48\%}$
test_creation_nested_2 57.4723μs 33.1891μs 30.1304 KOps/s 31.7060 KOps/s $\color{#d91a1a}-4.97\%$
test_clone 0.1018ms 32.7212μs 30.5612 KOps/s 33.3143 KOps/s $\textbf{\color{#d91a1a}-8.26\%}$
test_getitem[int] 59.6881μs 39.7961μs 25.1281 KOps/s 27.1144 KOps/s $\textbf{\color{#d91a1a}-7.33\%}$
test_getitem[slice_int] 0.1063ms 84.6032μs 11.8199 KOps/s 12.9471 KOps/s $\textbf{\color{#d91a1a}-8.71\%}$
test_getitem[range] 0.1382ms 0.1036ms 9.6540 KOps/s 9.7755 KOps/s $\color{#d91a1a}-1.24\%$
test_getitem[tuple] 0.1031ms 72.9349μs 13.7109 KOps/s 14.5211 KOps/s $\textbf{\color{#d91a1a}-5.58\%}$
test_getitem[list] 0.1361ms 93.5898μs 10.6849 KOps/s 11.2554 KOps/s $\textbf{\color{#d91a1a}-5.07\%}$
test_setitem_dim[int] 0.8141ms 64.5644μs 15.4884 KOps/s 15.0905 KOps/s $\color{#35bf28}+2.64\%$
test_setitem_dim[slice_int] 1.7302ms 0.1179ms 8.4808 KOps/s 8.8396 KOps/s $\color{#d91a1a}-4.06\%$
test_setitem_dim[range] 5.5161ms 0.1280ms 7.8142 KOps/s 7.8211 KOps/s $\color{#d91a1a}-0.09\%$
test_setitem_dim[tuple] 2.1152ms 0.1010ms 9.8969 KOps/s 10.2669 KOps/s $\color{#d91a1a}-3.60\%$
test_setitem 69.6263μs 46.6061μs 21.4564 KOps/s 17.2886 KOps/s $\textbf{\color{#35bf28}+24.11\%}$
test_set 55.6012μs 46.7110μs 21.4082 KOps/s 17.5640 KOps/s $\textbf{\color{#35bf28}+21.89\%}$
test_set_shared 0.3534ms 0.3028ms 3.3022 KOps/s 3.5001 KOps/s $\textbf{\color{#d91a1a}-5.65\%}$
test_update 0.1065ms 56.6897μs 17.6399 KOps/s 18.5396 KOps/s $\color{#d91a1a}-4.85\%$
test_update_nested 89.3484μs 77.5480μs 12.8952 KOps/s 13.1294 KOps/s $\color{#d91a1a}-1.78\%$
test_set_nested 0.1895ms 62.9980μs 15.8735 KOps/s 17.8049 KOps/s $\textbf{\color{#d91a1a}-10.85\%}$
test_set_nested_new 0.1424ms 85.1343μs 11.7462 KOps/s 13.4448 KOps/s $\textbf{\color{#d91a1a}-12.63\%}$
test_select 0.1845ms 0.1317ms 7.5921 KOps/s 8.4194 KOps/s $\textbf{\color{#d91a1a}-9.83\%}$
test_creation[device0] 2.1654ms 0.7214ms 1.3862 KOps/s 1.4945 KOps/s $\textbf{\color{#d91a1a}-7.25\%}$
test_creation_from_tensor 0.7175ms 0.6073ms 1.6467 KOps/s 1.5263 KOps/s $\textbf{\color{#35bf28}+7.89\%}$
test_add_one[memmap_tensor0] 0.1511ms 75.3254μs 13.2757 KOps/s 17.9368 KOps/s $\textbf{\color{#d91a1a}-25.99\%}$
test_contiguous[memmap_tensor0] 25.4591μs 17.2545μs 57.9558 KOps/s 93.6142 KOps/s $\textbf{\color{#d91a1a}-38.09\%}$
test_stack[memmap_tensor0] 0.2708ms 90.6403μs 11.0326 KOps/s 12.9500 KOps/s $\textbf{\color{#d91a1a}-14.81\%}$
test_reshape_pytree 72.6583μs 48.6210μs 20.5673 KOps/s 29.0320 KOps/s $\textbf{\color{#d91a1a}-29.16\%}$
test_reshape_td 81.9464μs 68.0021μs 14.7054 KOps/s 19.5041 KOps/s $\textbf{\color{#d91a1a}-24.60\%}$
test_view_pytree 48.9712μs 41.2632μs 24.2347 KOps/s 31.4360 KOps/s $\textbf{\color{#d91a1a}-22.91\%}$
test_view_td 13.4621μs 9.0195μs 110.8710 KOps/s 116.5495 KOps/s $\color{#d91a1a}-4.87\%$
test_unbind_pytree 58.1233μs 47.7815μs 20.9286 KOps/s 26.3709 KOps/s $\textbf{\color{#d91a1a}-20.64\%}$
test_unbind_td 0.3253ms 0.2505ms 3.9913 KOps/s 4.6843 KOps/s $\textbf{\color{#d91a1a}-14.79\%}$
test_split_pytree 66.9933μs 45.8458μs 21.8123 KOps/s 22.9077 KOps/s $\color{#d91a1a}-4.78\%$
test_split_td 0.2267ms 0.1533ms 6.5247 KOps/s 7.5998 KOps/s $\textbf{\color{#d91a1a}-14.15\%}$
test_add_pytree 0.1643ms 58.2894μs 17.1558 KOps/s 17.7816 KOps/s $\color{#d91a1a}-3.52\%$
test_add_td 0.1619ms 0.1137ms 8.7942 KOps/s 8.8182 KOps/s $\color{#d91a1a}-0.27\%$
test_distributed 0.1449ms 0.1449ms 6.9013 KOps/s 6.4850 KOps/s $\textbf{\color{#35bf28}+6.42\%}$
test_tdmodule 0.4578ms 38.1685μs 26.1996 KOps/s 25.8127 KOps/s $\color{#35bf28}+1.50\%$
test_tdmodule_dispatch 9.1121ms 85.3388μs 11.7180 KOps/s 11.7699 KOps/s $\color{#d91a1a}-0.44\%$
test_tdseq 1.1154ms 49.2962μs 20.2856 KOps/s 20.0009 KOps/s $\color{#35bf28}+1.42\%$
test_tdseq_dispatch 2.4262ms 99.8428μs 10.0157 KOps/s 9.8725 KOps/s $\color{#35bf28}+1.45\%$
test_instantiation_functorch 2.3683ms 1.8077ms 553.1868 Ops/s 522.5698 Ops/s $\textbf{\color{#35bf28}+5.86\%}$
test_instantiation_td 1.8037ms 1.3746ms 727.4675 Ops/s 722.8812 Ops/s $\color{#35bf28}+0.63\%$
test_exec_functorch 0.3869ms 0.2664ms 3.7533 KOps/s 3.9638 KOps/s $\textbf{\color{#d91a1a}-5.31\%}$
test_exec_td 0.5607ms 0.4615ms 2.1669 KOps/s 2.1410 KOps/s $\color{#35bf28}+1.21\%$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants