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

[Minor] Fix type deletion in tensorclass load_memmap #602

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Dec 21, 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 Dec 21, 2023
@vmoens vmoens marked this pull request as ready for review December 21, 2023 13:37
@vmoens vmoens merged commit 5b6573a into main Dec 21, 2023
17 of 32 checks passed
@vmoens vmoens deleted the fix-del-type branch December 21, 2023 13:37
Copy link

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

Total Benchmarks: 120. Improved: $\large\color{#35bf28}24$. Worsened: $\large\color{#d91a1a}7$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_plain_set_nested 36.9980μs 15.9786μs 62.5838 KOps/s 58.2844 KOps/s $\textbf{\color{#35bf28}+7.38\%}$
test_plain_set_stack_nested 0.2062ms 0.1441ms 6.9420 KOps/s 6.8051 KOps/s $\color{#35bf28}+2.01\%$
test_plain_set_nested_inplace 52.2780μs 18.6215μs 53.7013 KOps/s 50.5927 KOps/s $\textbf{\color{#35bf28}+6.14\%}$
test_plain_set_stack_nested_inplace 0.4136ms 0.1788ms 5.5926 KOps/s 5.5356 KOps/s $\color{#35bf28}+1.03\%$
test_items 27.0200μs 2.3920μs 418.0605 KOps/s 422.3486 KOps/s $\color{#d91a1a}-1.02\%$
test_items_nested 1.4176ms 0.2817ms 3.5494 KOps/s 3.7108 KOps/s $\color{#d91a1a}-4.35\%$
test_items_nested_locked 0.3828ms 0.2810ms 3.5582 KOps/s 3.6805 KOps/s $\color{#d91a1a}-3.32\%$
test_items_nested_leaf 1.0773ms 0.1733ms 5.7710 KOps/s 5.9463 KOps/s $\color{#d91a1a}-2.95\%$
test_items_stack_nested 1.7380ms 1.5382ms 650.1207 Ops/s 646.2732 Ops/s $\color{#35bf28}+0.60\%$
test_items_stack_nested_leaf 1.5207ms 1.3980ms 715.2864 Ops/s 708.1023 Ops/s $\color{#35bf28}+1.01\%$
test_items_stack_nested_locked 1.8582ms 0.7715ms 1.2961 KOps/s 1.2804 KOps/s $\color{#35bf28}+1.22\%$
test_keys 33.3120μs 3.8417μs 260.3022 KOps/s 260.8904 KOps/s $\color{#d91a1a}-0.23\%$
test_keys_nested 0.5429ms 0.1482ms 6.7476 KOps/s 6.6149 KOps/s $\color{#35bf28}+2.01\%$
test_keys_nested_locked 0.2593ms 0.1472ms 6.7915 KOps/s 6.6237 KOps/s $\color{#35bf28}+2.53\%$
test_keys_nested_leaf 0.2443ms 0.1295ms 7.7225 KOps/s 7.4637 KOps/s $\color{#35bf28}+3.47\%$
test_keys_stack_nested 2.1908ms 1.4734ms 678.6844 Ops/s 668.0951 Ops/s $\color{#35bf28}+1.58\%$
test_keys_stack_nested_leaf 1.6073ms 1.4612ms 684.3680 Ops/s 674.2417 Ops/s $\color{#35bf28}+1.50\%$
test_keys_stack_nested_locked 1.1012ms 0.6746ms 1.4823 KOps/s 1.4297 KOps/s $\color{#35bf28}+3.67\%$
test_values 7.3110μs 1.1756μs 850.6451 KOps/s 881.8089 KOps/s $\color{#d91a1a}-3.53\%$
test_values_nested 92.0220μs 52.0624μs 19.2077 KOps/s 19.1249 KOps/s $\color{#35bf28}+0.43\%$
test_values_nested_locked 93.0440μs 52.6212μs 19.0038 KOps/s 19.1065 KOps/s $\color{#d91a1a}-0.54\%$
test_values_nested_leaf 97.5520μs 48.1357μs 20.7746 KOps/s 21.3551 KOps/s $\color{#d91a1a}-2.72\%$
test_values_stack_nested 2.2498ms 1.2481ms 801.1918 Ops/s 799.0456 Ops/s $\color{#35bf28}+0.27\%$
test_values_stack_nested_leaf 1.3685ms 1.2472ms 801.7996 Ops/s 780.9372 Ops/s $\color{#35bf28}+2.67\%$
test_values_stack_nested_locked 0.9703ms 0.5136ms 1.9470 KOps/s 1.9281 KOps/s $\color{#35bf28}+0.98\%$
test_membership 20.2180μs 1.3343μs 749.4385 KOps/s 755.7146 KOps/s $\color{#d91a1a}-0.83\%$
test_membership_nested 0.1045ms 2.9574μs 338.1313 KOps/s 354.4644 KOps/s $\color{#d91a1a}-4.61\%$
test_membership_nested_leaf 31.0680μs 3.1167μs 320.8572 KOps/s 347.8706 KOps/s $\textbf{\color{#d91a1a}-7.77\%}$
test_membership_stacked_nested 49.7330μs 11.8361μs 84.4875 KOps/s 73.7067 KOps/s $\textbf{\color{#35bf28}+14.63\%}$
test_membership_stacked_nested_leaf 37.5700μs 11.8292μs 84.5363 KOps/s 84.6588 KOps/s $\color{#d91a1a}-0.14\%$
test_membership_nested_last 31.3980μs 6.0090μs 166.4173 KOps/s 164.4585 KOps/s $\color{#35bf28}+1.19\%$
test_membership_nested_leaf_last 37.5710μs 6.0291μs 165.8628 KOps/s 166.0890 KOps/s $\color{#d91a1a}-0.14\%$
test_membership_stacked_nested_last 0.2293ms 0.1661ms 6.0212 KOps/s 5.9216 KOps/s $\color{#35bf28}+1.68\%$
test_membership_stacked_nested_leaf_last 44.1930μs 14.0312μs 71.2699 KOps/s 71.0328 KOps/s $\color{#35bf28}+0.33\%$
test_nested_getleaf 38.6130μs 10.5584μs 94.7113 KOps/s 93.1967 KOps/s $\color{#35bf28}+1.63\%$
test_nested_get 89.1770μs 9.8754μs 101.2613 KOps/s 98.3058 KOps/s $\color{#35bf28}+3.01\%$
test_stacked_getleaf 1.2825ms 0.6851ms 1.4597 KOps/s 1.4951 KOps/s $\color{#d91a1a}-2.36\%$
test_stacked_get 1.1058ms 0.6575ms 1.5210 KOps/s 1.5611 KOps/s $\color{#d91a1a}-2.57\%$
test_nested_getitemleaf 42.9500μs 10.5743μs 94.5692 KOps/s 93.4285 KOps/s $\color{#35bf28}+1.22\%$
test_nested_getitem 39.2630μs 9.8520μs 101.5022 KOps/s 98.3592 KOps/s $\color{#35bf28}+3.20\%$
test_stacked_getitemleaf 0.8305ms 0.6850ms 1.4598 KOps/s 1.4794 KOps/s $\color{#d91a1a}-1.32\%$
test_stacked_getitem 1.1956ms 0.6557ms 1.5252 KOps/s 1.5522 KOps/s $\color{#d91a1a}-1.74\%$
test_lock_nested 59.4232ms 0.4729ms 2.1145 KOps/s 2.3872 KOps/s $\textbf{\color{#d91a1a}-11.42\%}$
test_lock_stack_nested 77.6811ms 6.7015ms 149.2212 Ops/s 141.0704 Ops/s $\textbf{\color{#35bf28}+5.78\%}$
test_unlock_nested 1.0028ms 0.4229ms 2.3647 KOps/s 2.3643 KOps/s $\color{#35bf28}+0.02\%$
test_unlock_stack_nested 76.3246ms 6.2764ms 159.3268 Ops/s 152.7278 Ops/s $\color{#35bf28}+4.32\%$
test_flatten_speed 0.6692ms 0.3644ms 2.7440 KOps/s 2.6684 KOps/s $\color{#35bf28}+2.83\%$
test_unflatten_speed 0.7481ms 0.4546ms 2.1999 KOps/s 2.2229 KOps/s $\color{#d91a1a}-1.03\%$
test_common_ops 2.3649ms 0.6577ms 1.5204 KOps/s 1.4144 KOps/s $\textbf{\color{#35bf28}+7.49\%}$
test_creation 16.8120μs 1.9666μs 508.4859 KOps/s 503.2721 KOps/s $\color{#35bf28}+1.04\%$
test_creation_empty 69.7700μs 7.6152μs 131.3163 KOps/s 98.0540 KOps/s $\textbf{\color{#35bf28}+33.92\%}$
test_creation_nested_1 36.7190μs 10.3700μs 96.4325 KOps/s 76.6581 KOps/s $\textbf{\color{#35bf28}+25.80\%}$
test_creation_nested_2 65.1420μs 15.7375μs 63.5424 KOps/s 53.9875 KOps/s $\textbf{\color{#35bf28}+17.70\%}$
test_clone 0.2984ms 12.7306μs 78.5509 KOps/s 82.1174 KOps/s $\color{#d91a1a}-4.34\%$
test_getitem[int] 36.6780μs 11.9005μs 84.0301 KOps/s 80.9739 KOps/s $\color{#35bf28}+3.77\%$
test_getitem[slice_int] 53.2700μs 24.1003μs 41.4933 KOps/s 41.1233 KOps/s $\color{#35bf28}+0.90\%$
test_getitem[range] 0.1411ms 41.7604μs 23.9461 KOps/s 23.7164 KOps/s $\color{#35bf28}+0.97\%$
test_getitem[tuple] 54.0610μs 19.2942μs 51.8292 KOps/s 52.0209 KOps/s $\color{#d91a1a}-0.37\%$
test_getitem[list] 73.6880μs 37.0514μs 26.9895 KOps/s 27.1241 KOps/s $\color{#d91a1a}-0.50\%$
test_setitem_dim[int] 47.7390μs 27.2616μs 36.6816 KOps/s 33.1366 KOps/s $\textbf{\color{#35bf28}+10.70\%}$
test_setitem_dim[slice_int] 81.1720μs 51.5617μs 19.3943 KOps/s 18.2669 KOps/s $\textbf{\color{#35bf28}+6.17\%}$
test_setitem_dim[range] 0.1338ms 70.0337μs 14.2788 KOps/s 13.6062 KOps/s $\color{#35bf28}+4.94\%$
test_setitem_dim[tuple] 75.8320μs 39.8785μs 25.0762 KOps/s 23.2235 KOps/s $\textbf{\color{#35bf28}+7.98\%}$
test_setitem 0.2632ms 16.8951μs 59.1888 KOps/s 53.5824 KOps/s $\textbf{\color{#35bf28}+10.46\%}$
test_set 0.2853ms 16.3923μs 61.0044 KOps/s 55.3938 KOps/s $\textbf{\color{#35bf28}+10.13\%}$
test_set_shared 4.6562ms 0.1411ms 7.0888 KOps/s 7.1338 KOps/s $\color{#d91a1a}-0.63\%$
test_update 0.2885ms 18.4560μs 54.1828 KOps/s 47.9932 KOps/s $\textbf{\color{#35bf28}+12.90\%}$
test_update_nested 0.2983ms 25.3907μs 39.3846 KOps/s 35.6615 KOps/s $\textbf{\color{#35bf28}+10.44\%}$
test_set_nested 0.2261ms 18.7463μs 53.3439 KOps/s 51.1058 KOps/s $\color{#35bf28}+4.38\%$
test_set_nested_new 0.2687ms 22.6462μs 44.1575 KOps/s 42.0409 KOps/s $\textbf{\color{#35bf28}+5.03\%}$
test_select 0.1917ms 45.7051μs 21.8794 KOps/s 21.5669 KOps/s $\color{#35bf28}+1.45\%$
test_unbind_speed 0.5408ms 0.3424ms 2.9206 KOps/s 2.9381 KOps/s $\color{#d91a1a}-0.60\%$
test_unbind_speed_stack0 70.8313ms 4.2569ms 234.9152 Ops/s 211.1339 Ops/s $\textbf{\color{#35bf28}+11.26\%}$
test_unbind_speed_stack1 1.7127μs 0.6205μs 1.6115 MOps/s 1.5911 MOps/s $\color{#35bf28}+1.28\%$
test_split 64.7970ms 1.6864ms 592.9859 Ops/s 650.2431 Ops/s $\textbf{\color{#d91a1a}-8.81\%}$
test_chunk 68.8275ms 1.6624ms 601.5375 Ops/s 600.4148 Ops/s $\color{#35bf28}+0.19\%$
test_creation[device0] 0.4797ms 0.2991ms 3.3438 KOps/s 3.3921 KOps/s $\color{#d91a1a}-1.42\%$
test_creation_from_tensor 3.6530ms 0.3340ms 2.9939 KOps/s 2.9949 KOps/s $\color{#d91a1a}-0.03\%$
test_add_one[memmap_tensor0] 0.1188ms 25.5169μs 39.1897 KOps/s 39.9100 KOps/s $\color{#d91a1a}-1.80\%$
test_contiguous[memmap_tensor0] 36.7490μs 5.7600μs 173.6109 KOps/s 174.5858 KOps/s $\color{#d91a1a}-0.56\%$
test_stack[memmap_tensor0] 69.4190μs 19.5528μs 51.1435 KOps/s 53.0650 KOps/s $\color{#d91a1a}-3.62\%$
test_memmaptd_index 0.2894ms 0.1987ms 5.0326 KOps/s 4.9306 KOps/s $\color{#35bf28}+2.07\%$
test_memmaptd_index_astensor 0.5211ms 0.2608ms 3.8349 KOps/s 3.7377 KOps/s $\color{#35bf28}+2.60\%$
test_memmaptd_index_op 0.7985ms 0.5041ms 1.9838 KOps/s 1.8680 KOps/s $\textbf{\color{#35bf28}+6.20\%}$
test_serialize_model 0.1069s 0.1014s 9.8624 Ops/s 8.7558 Ops/s $\textbf{\color{#35bf28}+12.64\%}$
test_serialize_model_filesystem 0.1738s 0.1019s 9.8165 Ops/s 10.5246 Ops/s $\textbf{\color{#d91a1a}-6.73\%}$
test_serialize_model_pickle 0.4497s 0.3820s 2.6177 Ops/s 2.6244 Ops/s $\color{#d91a1a}-0.25\%$
test_serialize_weights 0.1588s 0.1047s 9.5534 Ops/s 9.3587 Ops/s $\color{#35bf28}+2.08\%$
test_serialize_weights_filesystem 0.1604s 0.1006s 9.9420 Ops/s 10.7665 Ops/s $\textbf{\color{#d91a1a}-7.66\%}$
test_serialize_weights_returnearly 0.1304s 0.1242s 8.0502 Ops/s 7.9368 Ops/s $\color{#35bf28}+1.43\%$
test_serialize_weights_pickle 1.2013s 0.6495s 1.5397 Ops/s 2.0957 Ops/s $\textbf{\color{#d91a1a}-26.53\%}$
test_reshape_pytree 53.8810μs 23.4544μs 42.6360 KOps/s 43.1409 KOps/s $\color{#d91a1a}-1.17\%$
test_reshape_td 76.9540μs 29.8799μs 33.4674 KOps/s 33.6057 KOps/s $\color{#d91a1a}-0.41\%$
test_view_pytree 76.4330μs 23.0239μs 43.4331 KOps/s 43.5351 KOps/s $\color{#d91a1a}-0.23\%$
test_view_td 24.2650μs 5.2628μs 190.0118 KOps/s 200.3576 KOps/s $\textbf{\color{#d91a1a}-5.16\%}$
test_unbind_pytree 73.8780μs 26.1646μs 38.2196 KOps/s 37.3571 KOps/s $\color{#35bf28}+2.31\%$
test_unbind_td 0.1109ms 55.2797μs 18.0898 KOps/s 17.9872 KOps/s $\color{#35bf28}+0.57\%$
test_split_pytree 56.6160μs 26.1449μs 38.2483 KOps/s 37.9173 KOps/s $\color{#35bf28}+0.87\%$
test_split_td 0.5891ms 43.3823μs 23.0509 KOps/s 22.4744 KOps/s $\color{#35bf28}+2.57\%$
test_add_pytree 95.2180μs 32.4383μs 30.8278 KOps/s 31.7002 KOps/s $\color{#d91a1a}-2.75\%$
test_add_td 86.7420μs 44.5224μs 22.4606 KOps/s 21.0736 KOps/s $\textbf{\color{#35bf28}+6.58\%}$
test_distributed 43.0400μs 6.1646μs 162.2174 KOps/s 167.5538 KOps/s $\color{#d91a1a}-3.18\%$
test_tdmodule 0.2871ms 20.6809μs 48.3538 KOps/s 42.5264 KOps/s $\textbf{\color{#35bf28}+13.70\%}$
test_tdmodule_dispatch 0.2154ms 39.6108μs 25.2457 KOps/s 23.7464 KOps/s $\textbf{\color{#35bf28}+6.31\%}$
test_tdseq 0.3946ms 24.6824μs 40.5147 KOps/s 38.7016 KOps/s $\color{#35bf28}+4.68\%$
test_tdseq_dispatch 0.5295ms 44.5276μs 22.4580 KOps/s 21.6573 KOps/s $\color{#35bf28}+3.70\%$
test_instantiation_functorch 2.0029ms 1.3015ms 768.3604 Ops/s 772.6110 Ops/s $\color{#d91a1a}-0.55\%$
test_instantiation_td 1.5735ms 1.0139ms 986.2434 Ops/s 1.0006 KOps/s $\color{#d91a1a}-1.44\%$
test_exec_functorch 0.2444ms 0.1573ms 6.3569 KOps/s 6.4316 KOps/s $\color{#d91a1a}-1.16\%$
test_exec_functional_call 0.3222ms 0.1464ms 6.8284 KOps/s 6.9501 KOps/s $\color{#d91a1a}-1.75\%$
test_exec_td 0.2736ms 0.1420ms 7.0441 KOps/s 6.6152 KOps/s $\textbf{\color{#35bf28}+6.48\%}$
test_exec_td_decorator 0.8576ms 0.1727ms 5.7913 KOps/s 5.5727 KOps/s $\color{#35bf28}+3.92\%$
test_vmap_mlp_speed[True-True] 1.4626ms 0.9198ms 1.0872 KOps/s 1.0823 KOps/s $\color{#35bf28}+0.46\%$
test_vmap_mlp_speed[True-False] 0.8726ms 0.4728ms 2.1150 KOps/s 2.1336 KOps/s $\color{#d91a1a}-0.87\%$
test_vmap_mlp_speed[False-True] 1.0472ms 0.7977ms 1.2535 KOps/s 1.2633 KOps/s $\color{#d91a1a}-0.77\%$
test_vmap_mlp_speed[False-False] 0.6064ms 0.3919ms 2.5516 KOps/s 2.5955 KOps/s $\color{#d91a1a}-1.69\%$
test_vmap_mlp_speed_decorator[True-True] 2.6418ms 1.8225ms 548.6901 Ops/s 500.1161 Ops/s $\textbf{\color{#35bf28}+9.71\%}$
test_vmap_mlp_speed_decorator[True-False] 1.0760ms 0.5221ms 1.9154 KOps/s 1.9174 KOps/s $\color{#d91a1a}-0.10\%$
test_vmap_mlp_speed_decorator[False-True] 2.0517ms 1.5234ms 656.4280 Ops/s 646.2235 Ops/s $\color{#35bf28}+1.58\%$
test_vmap_mlp_speed_decorator[False-False] 0.7963ms 0.4021ms 2.4872 KOps/s 2.5302 KOps/s $\color{#d91a1a}-1.70\%$

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