-
Notifications
You must be signed in to change notification settings - Fork 76
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] as_decorator and __enter__ __exit__ methods #455
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 22, 2023
|
Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
---|---|---|---|---|---|
test_items | 25.2010μs | 3.4461μs | 290.1856 KOps/s | 293.1561 KOps/s | |
test_items_nested | 1.7314ms | 0.5659ms | 1.7670 KOps/s | 1.6918 KOps/s | |
test_items_nested_locked | 0.2861ms | 0.1949ms | 5.1318 KOps/s | 4.9192 KOps/s | |
test_items_nested_leaf | 0.5431ms | 0.3268ms | 3.0603 KOps/s | 2.7726 KOps/s | |
test_items_stack_nested | 30.2932ms | 30.0506ms | 33.2773 Ops/s | 33.2604 Ops/s | |
test_items_stack_nested_leaf | 16.5088ms | 16.3847ms | 61.0324 Ops/s | 60.8984 Ops/s | |
test_items_stack_nested_locked | 1.7785ms | 1.6603ms | 602.3166 Ops/s | 572.4739 Ops/s | |
test_keys | 26.2010μs | 5.0729μs | 197.1268 KOps/s | 196.6979 KOps/s | |
test_keys_nested | 0.2373ms | 0.1800ms | 5.5554 KOps/s | 5.5438 KOps/s | |
test_keys_nested_locked | 0.2016ms | 0.1796ms | 5.5689 KOps/s | 5.5409 KOps/s | |
test_keys_nested_leaf | 0.1980ms | 0.1775ms | 5.6335 KOps/s | 5.6221 KOps/s | |
test_keys_stack_nested | 2.1732ms | 2.0608ms | 485.2384 Ops/s | 480.8078 Ops/s | |
test_keys_stack_nested_leaf | 2.1137ms | 2.0609ms | 485.2199 Ops/s | 479.4226 Ops/s | |
test_keys_stack_nested_locked | 0.7535ms | 0.6499ms | 1.5388 KOps/s | 1.4778 KOps/s | |
test_values | 22.4000μs | 1.5558μs | 642.7609 KOps/s | 642.7739 KOps/s | |
test_values_nested | 0.6423ms | 0.5630ms | 1.7760 KOps/s | 1.6954 KOps/s | |
test_values_nested_locked | 0.2231ms | 0.1929ms | 5.1842 KOps/s | 5.0027 KOps/s | |
test_values_nested_leaf | 0.3560ms | 0.3244ms | 3.0827 KOps/s | 2.9508 KOps/s | |
test_values_stack_nested | 33.5518ms | 30.0623ms | 33.2643 Ops/s | 33.2420 Ops/s | |
test_values_stack_nested_leaf | 17.1540ms | 16.3198ms | 61.2754 Ops/s | 60.7316 Ops/s | |
test_values_stack_nested_locked | 1.7085ms | 1.6587ms | 602.8836 Ops/s | 579.1291 Ops/s | |
test_membership | 12.5000μs | 1.8597μs | 537.7195 KOps/s | 537.5467 KOps/s | |
test_membership_nested | 20.1000μs | 3.3085μs | 302.2513 KOps/s | 295.7972 KOps/s | |
test_membership_nested_leaf | 25.6010μs | 3.3387μs | 299.5203 KOps/s | 297.6402 KOps/s | |
test_membership_stacked_nested | 14.4000μs | 1.9528μs | 512.0910 KOps/s | 527.1501 KOps/s | |
test_membership_stacked_nested_leaf | 27.7010μs | 1.9016μs | 525.8797 KOps/s | 522.0970 KOps/s | |
test_stacked_getleaf | 1.4290ms | 1.3938ms | 717.4421 Ops/s | 718.3294 Ops/s | |
test_stacked_get | 1.4609ms | 1.3527ms | 739.2718 Ops/s | 745.3822 Ops/s | |
test_lock_nested | 1.1755ms | 0.9869ms | 1.0133 KOps/s | 1.1012 KOps/s | |
test_lock_stack_nested | 87.2404ms | 13.6137ms | 73.4555 Ops/s | 75.2836 Ops/s | |
test_unlock_nested | 1.1736ms | 0.9810ms | 1.0193 KOps/s | 1.0814 KOps/s | |
test_unlock_stack_nested | 86.1782ms | 14.0105ms | 71.3749 Ops/s | 96.5962 Ops/s | |
test_flatten_speed | 0.9986ms | 0.9504ms | 1.0522 KOps/s | 1.0678 KOps/s | |
test_unflatten_speed | 1.8281ms | 1.7219ms | 580.7464 Ops/s | 592.9362 Ops/s | |
test_common_ops | 1.6046ms | 1.1061ms | 904.0437 Ops/s | 942.0684 Ops/s | |
test_creation | 29.0000μs | 6.4892μs | 154.1016 KOps/s | 173.4451 KOps/s | |
test_creation_empty | 31.5000μs | 13.3711μs | 74.7881 KOps/s | 77.8769 KOps/s | |
test_creation_nested_1 | 43.7010μs | 26.2905μs | 38.0365 KOps/s | 39.9866 KOps/s | |
test_creation_nested_2 | 50.6010μs | 26.1002μs | 38.3139 KOps/s | 40.0336 KOps/s | |
test_clone | 0.2965ms | 25.7045μs | 38.9036 KOps/s | 41.7332 KOps/s | |
test_getitem[int] | 99.2010μs | 31.1812μs | 32.0706 KOps/s | 33.6150 KOps/s | |
test_getitem[slice_int] | 92.0020μs | 67.5718μs | 14.7991 KOps/s | 15.3658 KOps/s | |
test_getitem[range] | 97.0010μs | 69.1109μs | 14.4695 KOps/s | 15.2767 KOps/s | |
test_getitem[tuple] | 81.9010μs | 62.9620μs | 15.8826 KOps/s | 16.6176 KOps/s | |
test_getitem[list] | 82.7010μs | 60.2051μs | 16.6099 KOps/s | 17.3696 KOps/s | |
test_setitem_dim[int] | 59.6010μs | 44.1239μs | 22.6635 KOps/s | 22.7735 KOps/s | |
test_setitem_dim[slice_int] | 0.1155ms | 83.3333μs | 12.0000 KOps/s | 12.0583 KOps/s | |
test_setitem_dim[range] | 0.1010ms | 77.7827μs | 12.8563 KOps/s | 12.9822 KOps/s | |
test_setitem_dim[tuple] | 95.4010μs | 75.8602μs | 13.1821 KOps/s | 13.3684 KOps/s | |
test_setitem | 0.2553ms | 32.6378μs | 30.6393 KOps/s | 32.6494 KOps/s | |
test_set | 0.2143ms | 32.1834μs | 31.0719 KOps/s | 33.4629 KOps/s | |
test_set_shared | 0.2971ms | 0.1739ms | 5.7512 KOps/s | 6.0372 KOps/s | |
test_update | 0.2173ms | 34.1368μs | 29.2939 KOps/s | 29.5932 KOps/s | |
test_update_nested | 0.3339ms | 51.4454μs | 19.4381 KOps/s | 20.2159 KOps/s | |
test_set_nested | 0.2356ms | 43.3711μs | 23.0568 KOps/s | 24.2379 KOps/s | |
test_set_nested_new | 86.9010μs | 62.4748μs | 16.0064 KOps/s | 16.8590 KOps/s | |
test_select | 0.1685ms | 0.1060ms | 9.4334 KOps/s | 10.0422 KOps/s | |
test_creation[device0] | 0.5577ms | 0.4439ms | 2.2530 KOps/s | 2.2576 KOps/s | |
test_creation_from_tensor | 0.5964ms | 0.4954ms | 2.0187 KOps/s | 1.9748 KOps/s | |
test_add_one[memmap_tensor0] | 0.2358ms | 33.0835μs | 30.2266 KOps/s | 30.3133 KOps/s | |
test_contiguous[memmap_tensor0] | 31.4000μs | 8.8472μs | 113.0298 KOps/s | 115.4998 KOps/s | |
test_stack[memmap_tensor0] | 0.1739ms | 26.7663μs | 37.3604 KOps/s | 37.8937 KOps/s | |
test_memmaptd_index | 0.3276ms | 0.2834ms | 3.5287 KOps/s | 3.5234 KOps/s | |
test_memmaptd_index_astensor | 1.1080ms | 1.0692ms | 935.3119 Ops/s | 921.0600 Ops/s | |
test_memmaptd_index_op | 2.3820ms | 2.2634ms | 441.8119 Ops/s | 445.3997 Ops/s | |
test_reshape_pytree | 95.1020μs | 37.7345μs | 26.5009 KOps/s | 26.2792 KOps/s | |
test_reshape_td | 74.3010μs | 46.3088μs | 21.5942 KOps/s | 22.6767 KOps/s | |
test_view_pytree | 94.0010μs | 35.3428μs | 28.2943 KOps/s | 28.2520 KOps/s | |
test_view_td | 62.5010μs | 9.7172μs | 102.9101 KOps/s | 99.9864 KOps/s | |
test_unbind_pytree | 83.7010μs | 38.9299μs | 25.6872 KOps/s | 25.1282 KOps/s | |
test_unbind_td | 0.1673ms | 0.1381ms | 7.2423 KOps/s | 7.5269 KOps/s | |
test_split_pytree | 0.1008ms | 45.0805μs | 22.1826 KOps/s | 22.0680 KOps/s | |
test_split_td | 0.9116ms | 0.1164ms | 8.5921 KOps/s | 8.8909 KOps/s | |
test_add_pytree | 94.6010μs | 48.5826μs | 20.5835 KOps/s | 20.8607 KOps/s | |
test_add_td | 81.4020μs | 59.7993μs | 16.7226 KOps/s | 17.3790 KOps/s | |
test_distributed | 23.2000μs | 8.7875μs | 113.7974 KOps/s | 109.0366 KOps/s | |
test_tdmodule | 4.3501ms | 30.2009μs | 33.1116 KOps/s | 37.8656 KOps/s | |
test_tdmodule_dispatch | 0.2741ms | 56.0849μs | 17.8301 KOps/s | 17.6750 KOps/s | |
test_tdseq | 0.1728ms | 35.7823μs | 27.9467 KOps/s | 30.8458 KOps/s | |
test_tdseq_dispatch | 0.2079ms | 67.2267μs | 14.8750 KOps/s | 14.8877 KOps/s | |
test_instantiation_functorch | 1.7512ms | 1.6114ms | 620.5944 Ops/s | 615.1729 Ops/s | |
test_instantiation_td | 1.9388ms | 1.3460ms | 742.9460 Ops/s | 696.9036 Ops/s | |
test_exec_functorch | 0.2215ms | 0.1886ms | 5.3028 KOps/s | 5.2743 KOps/s | |
test_exec_td | 0.2498ms | 0.1755ms | 5.6976 KOps/s | 5.7629 KOps/s | |
test_vmap_mlp_speed[True-True] | 1.2398ms | 0.8481ms | 1.1791 KOps/s | 1.1860 KOps/s | |
test_vmap_mlp_speed[True-False] | 1.8984ms | 0.5729ms | 1.7455 KOps/s | 1.6169 KOps/s | |
test_vmap_mlp_speed[False-True] | 1.2044ms | 0.7030ms | 1.4224 KOps/s | 1.4429 KOps/s | |
test_vmap_mlp_speed[False-False] | 0.8914ms | 0.4241ms | 2.3582 KOps/s | 2.3384 KOps/s | |
test_vmap_transformer_speed[True-True] | 11.6660ms | 10.5900ms | 94.4287 Ops/s | 94.8229 Ops/s | |
test_vmap_transformer_speed[True-False] | 10.0184ms | 8.2659ms | 120.9791 Ops/s | 120.7509 Ops/s | |
test_vmap_transformer_speed[False-True] | 23.5198ms | 10.5735ms | 94.5764 Ops/s | 95.0052 Ops/s | |
test_vmap_transformer_speed[False-False] | 11.0682ms | 8.2565ms | 121.1172 Ops/s | 122.2468 Ops/s |
tcbegley
approved these changes
Jun 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.