-
Notifications
You must be signed in to change notification settings - Fork 79
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] to_namedtuple and from_namedtuple #788
Merged
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
# Conflicts: # tensordict/base.py
shagunsodhani
approved these changes
May 23, 2024
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.
Awesome - thank you!
# Conflicts: # tensordict/base.py
I guess here a similar thing for tensorclasses could also be handy, I don't think |
My bad this works OOB import torch
from tensordict import tensordict, tensorclass
@tensorclass
class tc:
X: torch.Tensor
y: str
data = tc(X=torch.rand(()), y="a string!")
nt = data.to_namedtuple()
print(data.from_namedtuple(nt)) I have no idea how though haha |
|
Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
---|---|---|---|---|---|
test_plain_set_nested | 40.0840μs | 17.4569μs | 57.2838 KOps/s | 60.7392 KOps/s | |
test_plain_set_stack_nested | 54.5110μs | 17.6777μs | 56.5685 KOps/s | 58.8290 KOps/s | |
test_plain_set_nested_inplace | 80.6000μs | 19.6457μs | 50.9018 KOps/s | 53.1648 KOps/s | |
test_plain_set_stack_nested_inplace | 60.3430μs | 19.4833μs | 51.3261 KOps/s | 52.6329 KOps/s | |
test_items | 24.3550μs | 2.4933μs | 401.0781 KOps/s | 346.9279 KOps/s | |
test_items_nested | 0.6365ms | 0.2727ms | 3.6673 KOps/s | 3.6427 KOps/s | |
test_items_nested_locked | 0.4428ms | 0.2718ms | 3.6786 KOps/s | 3.7192 KOps/s | |
test_items_nested_leaf | 0.1355ms | 77.7136μs | 12.8678 KOps/s | 12.7670 KOps/s | |
test_items_stack_nested | 0.4318ms | 0.2742ms | 3.6472 KOps/s | 3.7032 KOps/s | |
test_items_stack_nested_leaf | 0.1480ms | 77.6183μs | 12.8836 KOps/s | 12.9801 KOps/s | |
test_items_stack_nested_locked | 0.4567ms | 0.2705ms | 3.6966 KOps/s | 3.7212 KOps/s | |
test_keys | 50.7840μs | 3.8995μs | 256.4411 KOps/s | 253.7927 KOps/s | |
test_keys_nested | 0.2296ms | 0.1383ms | 7.2329 KOps/s | 7.2330 KOps/s | |
test_keys_nested_locked | 0.7456ms | 0.1441ms | 6.9412 KOps/s | 6.9186 KOps/s | |
test_keys_nested_leaf | 0.2033ms | 0.1176ms | 8.5008 KOps/s | 8.4174 KOps/s | |
test_keys_stack_nested | 0.2411ms | 0.1382ms | 7.2359 KOps/s | 7.1240 KOps/s | |
test_keys_stack_nested_leaf | 0.1934ms | 0.1178ms | 8.4919 KOps/s | 8.4087 KOps/s | |
test_keys_stack_nested_locked | 0.2627ms | 0.1435ms | 6.9683 KOps/s | 7.0040 KOps/s | |
test_values | 7.4262μs | 1.2063μs | 829.0142 KOps/s | 872.0507 KOps/s | |
test_values_nested | 0.1079ms | 51.9007μs | 19.2676 KOps/s | 19.1878 KOps/s | |
test_values_nested_locked | 0.1142ms | 52.0175μs | 19.2243 KOps/s | 19.1484 KOps/s | |
test_values_nested_leaf | 0.1094ms | 46.0566μs | 21.7124 KOps/s | 21.1135 KOps/s | |
test_values_stack_nested | 0.1038ms | 52.0168μs | 19.2245 KOps/s | 19.3638 KOps/s | |
test_values_stack_nested_leaf | 0.1036ms | 45.7206μs | 21.8720 KOps/s | 21.3684 KOps/s | |
test_values_stack_nested_locked | 0.1043ms | 51.4332μs | 19.4427 KOps/s | 19.5320 KOps/s | |
test_membership | 13.1340μs | 1.3377μs | 747.5536 KOps/s | 728.7266 KOps/s | |
test_membership_nested | 27.6020μs | 3.4630μs | 288.7698 KOps/s | 293.3600 KOps/s | |
test_membership_nested_leaf | 27.0800μs | 3.4880μs | 286.6969 KOps/s | 293.4087 KOps/s | |
test_membership_stacked_nested | 19.6170μs | 3.4303μs | 291.5174 KOps/s | 294.7832 KOps/s | |
test_membership_stacked_nested_leaf | 40.2550μs | 3.4580μs | 289.1878 KOps/s | 292.6552 KOps/s | |
test_membership_nested_last | 28.0830μs | 4.2451μs | 235.5676 KOps/s | 239.9365 KOps/s | |
test_membership_nested_leaf_last | 31.6490μs | 4.2574μs | 234.8878 KOps/s | 238.1430 KOps/s | |
test_membership_stacked_nested_last | 26.9100μs | 4.2431μs | 235.6776 KOps/s | 241.9554 KOps/s | |
test_membership_stacked_nested_leaf_last | 41.8580μs | 4.2404μs | 235.8273 KOps/s | 240.2715 KOps/s | |
test_nested_getleaf | 46.0660μs | 10.6332μs | 94.0454 KOps/s | 92.0915 KOps/s | |
test_nested_get | 54.0310μs | 9.9851μs | 100.1495 KOps/s | 99.2595 KOps/s | |
test_stacked_getleaf | 66.3730μs | 10.6616μs | 93.7948 KOps/s | 92.8974 KOps/s | |
test_stacked_get | 54.2920μs | 9.9821μs | 100.1795 KOps/s | 99.1015 KOps/s | |
test_nested_getitemleaf | 54.7020μs | 11.3675μs | 87.9703 KOps/s | 89.5153 KOps/s | |
test_nested_getitem | 55.0330μs | 10.4347μs | 95.8339 KOps/s | 96.5501 KOps/s | |
test_stacked_getitemleaf | 65.9720μs | 11.0401μs | 90.5787 KOps/s | 90.0540 KOps/s | |
test_stacked_getitem | 32.7310μs | 10.3343μs | 96.7655 KOps/s | 97.7548 KOps/s | |
test_lock_nested | 53.3363ms | 0.4059ms | 2.4636 KOps/s | 2.8600 KOps/s | |
test_lock_stack_nested | 0.8546ms | 0.3117ms | 3.2084 KOps/s | 3.2336 KOps/s | |
test_unlock_nested | 0.8557ms | 0.3534ms | 2.8293 KOps/s | 2.4946 KOps/s | |
test_unlock_stack_nested | 0.4995ms | 0.3188ms | 3.1365 KOps/s | 3.1633 KOps/s | |
test_flatten_speed | 0.2211ms | 96.0540μs | 10.4108 KOps/s | 10.3633 KOps/s | |
test_unflatten_speed | 0.6761ms | 0.4021ms | 2.4872 KOps/s | 2.4472 KOps/s | |
test_common_ops | 4.5995ms | 0.7422ms | 1.3473 KOps/s | 1.4362 KOps/s | |
test_creation | 36.4680μs | 1.8827μs | 531.1567 KOps/s | 516.7533 KOps/s | |
test_creation_empty | 35.1750μs | 11.8937μs | 84.0782 KOps/s | 105.2095 KOps/s | |
test_creation_nested_1 | 41.6080μs | 14.5244μs | 68.8495 KOps/s | 82.4592 KOps/s | |
test_creation_nested_2 | 66.9550μs | 17.8967μs | 55.8762 KOps/s | 63.3684 KOps/s | |
test_clone | 90.5190μs | 13.7942μs | 72.4940 KOps/s | 74.2910 KOps/s | |
test_getitem[int] | 35.6070μs | 11.5499μs | 86.5807 KOps/s | 83.8607 KOps/s | |
test_getitem[slice_int] | 57.1070μs | 22.3996μs | 44.6436 KOps/s | 43.6462 KOps/s | |
test_getitem[range] | 78.8670μs | 57.7976μs | 17.3018 KOps/s | 16.6773 KOps/s | |
test_getitem[tuple] | 54.8530μs | 18.7194μs | 53.4205 KOps/s | 51.6514 KOps/s | |
test_getitem[list] | 0.1375ms | 41.0975μs | 24.3324 KOps/s | 24.8690 KOps/s | |
test_setitem_dim[int] | 70.7920μs | 36.4102μs | 27.4648 KOps/s | 30.0726 KOps/s | |
test_setitem_dim[slice_int] | 0.1013ms | 63.7358μs | 15.6898 KOps/s | 16.4577 KOps/s | |
test_setitem_dim[range] | 0.1419ms | 86.1706μs | 11.6049 KOps/s | 12.1452 KOps/s | |
test_setitem_dim[tuple] | 92.1620μs | 51.7990μs | 19.3054 KOps/s | 20.3891 KOps/s | |
test_setitem | 66.3030μs | 20.8620μs | 47.9340 KOps/s | 51.5678 KOps/s | |
test_set | 66.9950μs | 20.5429μs | 48.6787 KOps/s | 52.4455 KOps/s | |
test_set_shared | 3.6924ms | 0.1431ms | 6.9870 KOps/s | 7.0845 KOps/s | |
test_update | 0.1478ms | 22.9893μs | 43.4985 KOps/s | 48.8742 KOps/s | |
test_update_nested | 88.1450μs | 31.5827μs | 31.6629 KOps/s | 35.3135 KOps/s | |
test_update__nested | 0.1492ms | 26.6828μs | 37.4774 KOps/s | 39.7164 KOps/s | |
test_set_nested | 93.4040μs | 21.8956μs | 45.6714 KOps/s | 48.3060 KOps/s | |
test_set_nested_new | 0.1013ms | 25.8596μs | 38.6704 KOps/s | 40.1054 KOps/s | |
test_select | 0.1025ms | 41.6882μs | 23.9876 KOps/s | 25.4643 KOps/s | |
test_select_nested | 0.1315ms | 62.2076μs | 16.0752 KOps/s | 16.4146 KOps/s | |
test_exclude_nested | 0.2303ms | 0.1250ms | 7.9994 KOps/s | 8.3397 KOps/s | |
test_empty[True] | 0.5959ms | 0.4032ms | 2.4799 KOps/s | 2.5765 KOps/s | |
test_empty[False] | 5.8257μs | 1.0857μs | 921.0695 KOps/s | 924.4514 KOps/s | |
test_unbind_speed | 5.1287ms | 0.2632ms | 3.7987 KOps/s | 3.9070 KOps/s | |
test_unbind_speed_stack0 | 0.5058ms | 0.2566ms | 3.8970 KOps/s | 3.8188 KOps/s | |
test_unbind_speed_stack1 | 90.8674ms | 0.8992ms | 1.1120 KOps/s | 1.3064 KOps/s | |
test_split | 83.3110ms | 1.6436ms | 608.4282 Ops/s | 621.8864 Ops/s | |
test_chunk | 2.5362ms | 1.5061ms | 663.9486 Ops/s | 622.3298 Ops/s | |
test_creation[device0] | 0.2300ms | 84.0781μs | 11.8937 KOps/s | 11.9760 KOps/s | |
test_creation_from_tensor | 4.3851ms | 84.2553μs | 11.8687 KOps/s | 11.6786 KOps/s | |
test_add_one[memmap_tensor0] | 93.1140μs | 5.3937μs | 185.4013 KOps/s | 176.2966 KOps/s | |
test_contiguous[memmap_tensor0] | 21.8000μs | 0.6220μs | 1.6078 MOps/s | 1.5929 MOps/s | |
test_stack[memmap_tensor0] | 26.8100μs | 3.4729μs | 287.9476 KOps/s | 269.6626 KOps/s | |
test_memmaptd_index | 79.9123ms | 0.3012ms | 3.3197 KOps/s | 3.8010 KOps/s | |
test_memmaptd_index_astensor | 0.6460ms | 0.3235ms | 3.0914 KOps/s | 2.9753 KOps/s | |
test_memmaptd_index_op | 0.9201ms | 0.6224ms | 1.6068 KOps/s | 1.6116 KOps/s | |
test_serialize_model | 0.2467s | 0.1338s | 7.4712 Ops/s | 8.6011 Ops/s | |
test_serialize_model_pickle | 0.4549s | 0.3756s | 2.6627 Ops/s | 2.5848 Ops/s | |
test_serialize_weights | 0.1690s | 0.1122s | 8.9134 Ops/s | 8.8293 Ops/s | |
test_serialize_weights_returnearly | 0.1357s | 0.1262s | 7.9220 Ops/s | 7.9207 Ops/s | |
test_serialize_weights_pickle | 1.0161s | 0.6082s | 1.6442 Ops/s | 2.4632 Ops/s | |
test_serialize_weights_filesystem | 0.1033s | 93.3218ms | 10.7156 Ops/s | 10.5291 Ops/s | |
test_serialize_model_filesystem | 0.1642s | 0.1018s | 9.8253 Ops/s | 9.9941 Ops/s | |
test_reshape_pytree | 55.5640μs | 25.3460μs | 39.4540 KOps/s | 39.3718 KOps/s | |
test_reshape_td | 82.6040μs | 33.6270μs | 29.7380 KOps/s | 29.6539 KOps/s | |
test_view_pytree | 58.5090μs | 24.8457μs | 40.2484 KOps/s | 39.1452 KOps/s | |
test_view_td | 82.9650μs | 36.6953μs | 27.2515 KOps/s | 26.5396 KOps/s | |
test_unbind_pytree | 65.2020μs | 29.3106μs | 34.1173 KOps/s | 33.8467 KOps/s | |
test_unbind_td | 0.3581ms | 38.2337μs | 26.1550 KOps/s | 26.0719 KOps/s | |
test_split_pytree | 72.8560μs | 29.0677μs | 34.4025 KOps/s | 34.3865 KOps/s | |
test_split_td | 0.5102ms | 41.2234μs | 24.2580 KOps/s | 24.4140 KOps/s | |
test_add_pytree | 70.8720μs | 34.6896μs | 28.8271 KOps/s | 28.2498 KOps/s | |
test_add_td | 0.1163ms | 55.0694μs | 18.1589 KOps/s | 18.0703 KOps/s | |
test_distributed | 0.2584ms | 0.1031ms | 9.6968 KOps/s | 9.6270 KOps/s | |
test_tdmodule | 0.1025ms | 18.4927μs | 54.0755 KOps/s | 58.9032 KOps/s | |
test_tdmodule_dispatch | 61.0740μs | 36.6843μs | 27.2597 KOps/s | 29.8042 KOps/s | |
test_tdseq | 53.8500μs | 21.5188μs | 46.4711 KOps/s | 50.3596 KOps/s | |
test_tdseq_dispatch | 87.6340μs | 42.5569μs | 23.4979 KOps/s | 25.7705 KOps/s | |
test_instantiation_functorch | 1.5935ms | 1.3290ms | 752.4683 Ops/s | 754.9588 Ops/s | |
test_instantiation_td | 2.4151ms | 1.0501ms | 952.3175 Ops/s | 994.4575 Ops/s | |
test_exec_functorch | 0.2339ms | 0.1606ms | 6.2279 KOps/s | 6.1530 KOps/s | |
test_exec_functional_call | 0.2916ms | 0.1510ms | 6.6206 KOps/s | 6.5418 KOps/s | |
test_exec_td | 0.2270ms | 0.1440ms | 6.9453 KOps/s | 6.7365 KOps/s | |
test_exec_td_decorator | 0.8453ms | 0.2243ms | 4.4576 KOps/s | 4.4577 KOps/s | |
test_vmap_mlp_speed[True-True] | 0.6836ms | 0.4902ms | 2.0401 KOps/s | 2.0251 KOps/s | |
test_vmap_mlp_speed[True-False] | 0.5770ms | 0.4868ms | 2.0540 KOps/s | 2.0452 KOps/s | |
test_vmap_mlp_speed[False-True] | 0.8109ms | 0.4001ms | 2.4992 KOps/s | 2.4907 KOps/s | |
test_vmap_mlp_speed[False-False] | 0.5121ms | 0.3984ms | 2.5100 KOps/s | 2.4902 KOps/s | |
test_vmap_mlp_speed_decorator[True-True] | 0.8522ms | 0.5631ms | 1.7759 KOps/s | 1.7936 KOps/s | |
test_vmap_mlp_speed_decorator[True-False] | 0.8235ms | 0.5619ms | 1.7796 KOps/s | 1.7904 KOps/s | |
test_vmap_mlp_speed_decorator[False-True] | 0.7540ms | 0.4614ms | 2.1674 KOps/s | 2.1445 KOps/s | |
test_vmap_mlp_speed_decorator[False-False] | 0.6391ms | 0.4599ms | 2.1745 KOps/s | 2.1453 KOps/s | |
test_to_module_speed[True] | 2.5173ms | 1.7228ms | 580.4649 Ops/s | 592.7046 Ops/s | |
test_to_module_speed[False] | 1.7793ms | 1.6910ms | 591.3813 Ops/s | 606.9105 Ops/s |
|
Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
---|---|---|---|---|---|
test_plain_set_nested | 92.1520μs | 13.4222μs | 74.5034 KOps/s | 83.8550 KOps/s | |
test_plain_set_stack_nested | 26.4600μs | 13.6025μs | 73.5158 KOps/s | 83.2095 KOps/s | |
test_plain_set_nested_inplace | 0.1849ms | 14.6741μs | 68.1473 KOps/s | 76.0495 KOps/s | |
test_plain_set_stack_nested_inplace | 0.1822ms | 14.8804μs | 67.2026 KOps/s | 75.4053 KOps/s | |
test_items | 60.2810μs | 4.6262μs | 216.1605 KOps/s | 214.1692 KOps/s | |
test_items_nested | 0.3663ms | 0.3421ms | 2.9231 KOps/s | 2.9248 KOps/s | |
test_items_nested_locked | 0.5175ms | 0.3414ms | 2.9289 KOps/s | 2.8902 KOps/s | |
test_items_nested_leaf | 0.1104ms | 83.1707μs | 12.0235 KOps/s | 12.1647 KOps/s | |
test_items_stack_nested | 0.4109ms | 0.3490ms | 2.8656 KOps/s | 2.9536 KOps/s | |
test_items_stack_nested_leaf | 0.1155ms | 84.1595μs | 11.8822 KOps/s | 12.2439 KOps/s | |
test_items_stack_nested_locked | 0.3761ms | 0.3493ms | 2.8630 KOps/s | 2.9285 KOps/s | |
test_keys | 19.5200μs | 4.3489μs | 229.9444 KOps/s | 229.3605 KOps/s | |
test_keys_nested | 92.2820μs | 68.1478μs | 14.6740 KOps/s | 14.8980 KOps/s | |
test_keys_nested_locked | 0.7292ms | 72.7174μs | 13.7519 KOps/s | 13.9311 KOps/s | |
test_keys_nested_leaf | 0.1267ms | 57.8772μs | 17.2780 KOps/s | 17.3958 KOps/s | |
test_keys_stack_nested | 0.1091ms | 68.2623μs | 14.6494 KOps/s | 15.1513 KOps/s | |
test_keys_stack_nested_leaf | 81.9310μs | 58.0792μs | 17.2179 KOps/s | 17.5674 KOps/s | |
test_keys_stack_nested_locked | 95.7920μs | 72.7302μs | 13.7494 KOps/s | 14.2109 KOps/s | |
test_values | 7.7133μs | 1.8244μs | 548.1241 KOps/s | 552.4282 KOps/s | |
test_values_nested | 72.4720μs | 35.1336μs | 28.4627 KOps/s | 28.3679 KOps/s | |
test_values_nested_locked | 86.2810μs | 36.9398μs | 27.0710 KOps/s | 26.9030 KOps/s | |
test_values_nested_leaf | 53.3010μs | 31.0929μs | 32.1617 KOps/s | 31.8917 KOps/s | |
test_values_stack_nested | 54.8110μs | 35.4584μs | 28.2020 KOps/s | 27.8935 KOps/s | |
test_values_stack_nested_leaf | 99.1020μs | 31.2548μs | 31.9950 KOps/s | 31.3271 KOps/s | |
test_values_stack_nested_locked | 57.7810μs | 37.1586μs | 26.9117 KOps/s | 26.7255 KOps/s | |
test_membership | 12.5600μs | 0.8466μs | 1.1812 MOps/s | 1.1858 MOps/s | |
test_membership_nested | 29.1610μs | 2.6452μs | 378.0492 KOps/s | 378.3691 KOps/s | |
test_membership_nested_leaf | 19.5300μs | 2.6236μs | 381.1603 KOps/s | 381.2736 KOps/s | |
test_membership_stacked_nested | 33.2410μs | 2.6561μs | 376.4916 KOps/s | 378.9805 KOps/s | |
test_membership_stacked_nested_leaf | 20.3910μs | 2.6104μs | 383.0812 KOps/s | 381.1875 KOps/s | |
test_membership_nested_last | 60.4110μs | 3.1627μs | 316.1871 KOps/s | 318.6348 KOps/s | |
test_membership_nested_leaf_last | 70.7210μs | 3.1579μs | 316.6706 KOps/s | 320.9998 KOps/s | |
test_membership_stacked_nested_last | 24.2400μs | 3.6465μs | 274.2343 KOps/s | 101.1547 KOps/s | |
test_membership_stacked_nested_leaf_last | 20.9600μs | 3.5948μs | 278.1818 KOps/s | 101.9180 KOps/s | |
test_nested_getleaf | 37.0700μs | 8.4258μs | 118.6827 KOps/s | 119.2062 KOps/s | |
test_nested_get | 29.3200μs | 7.9394μs | 125.9536 KOps/s | 126.6668 KOps/s | |
test_stacked_getleaf | 36.7410μs | 8.4666μs | 118.1110 KOps/s | 119.1931 KOps/s | |
test_stacked_get | 64.4320μs | 7.9219μs | 126.2316 KOps/s | 126.6424 KOps/s | |
test_nested_getitemleaf | 36.5510μs | 8.6103μs | 116.1396 KOps/s | 116.9018 KOps/s | |
test_nested_getitem | 29.0310μs | 8.0982μs | 123.4839 KOps/s | 123.2964 KOps/s | |
test_stacked_getitemleaf | 24.5910μs | 8.6428μs | 115.7033 KOps/s | 115.9368 KOps/s | |
test_stacked_getitem | 48.5510μs | 8.0913μs | 123.5897 KOps/s | 123.6835 KOps/s | |
test_lock_nested | 60.7805ms | 0.4270ms | 2.3418 KOps/s | 2.3575 KOps/s | |
test_lock_stack_nested | 0.3827ms | 0.3185ms | 3.1399 KOps/s | 3.2655 KOps/s | |
test_unlock_nested | 0.8680ms | 0.3675ms | 2.7212 KOps/s | 2.7921 KOps/s | |
test_unlock_stack_nested | 0.3760ms | 0.3279ms | 3.0493 KOps/s | 3.1835 KOps/s | |
test_flatten_speed | 0.3014ms | 0.1005ms | 9.9474 KOps/s | 9.9479 KOps/s | |
test_unflatten_speed | 0.3471ms | 0.2893ms | 3.4568 KOps/s | 3.4449 KOps/s | |
test_common_ops | 1.0989ms | 0.6076ms | 1.6457 KOps/s | 1.8249 KOps/s | |
test_creation | 16.4300μs | 1.6794μs | 595.4619 KOps/s | 610.2752 KOps/s | |
test_creation_empty | 31.9510μs | 9.3818μs | 106.5897 KOps/s | 146.5825 KOps/s | |
test_creation_nested_1 | 29.6310μs | 11.1196μs | 89.9315 KOps/s | 116.8781 KOps/s | |
test_creation_nested_2 | 57.4110μs | 13.3613μs | 74.8432 KOps/s | 92.5719 KOps/s | |
test_clone | 0.1535ms | 13.3936μs | 74.6623 KOps/s | 85.9298 KOps/s | |
test_getitem[int] | 33.6710μs | 11.3632μs | 88.0035 KOps/s | 89.2235 KOps/s | |
test_getitem[slice_int] | 46.9310μs | 21.6557μs | 46.1771 KOps/s | 47.9659 KOps/s | |
test_getitem[range] | 66.5610μs | 50.5190μs | 19.7945 KOps/s | 19.6174 KOps/s | |
test_getitem[tuple] | 0.1443ms | 20.0690μs | 49.8282 KOps/s | 53.4806 KOps/s | |
test_getitem[list] | 0.1676ms | 35.8867μs | 27.8655 KOps/s | 28.6783 KOps/s | |
test_setitem_dim[int] | 51.8610μs | 31.5123μs | 31.7336 KOps/s | 34.7245 KOps/s | |
test_setitem_dim[slice_int] | 82.6520μs | 52.8511μs | 18.9211 KOps/s | 20.1181 KOps/s | |
test_setitem_dim[range] | 95.0420μs | 71.1137μs | 14.0620 KOps/s | 14.9672 KOps/s | |
test_setitem_dim[tuple] | 73.3910μs | 46.1406μs | 21.6729 KOps/s | 24.0281 KOps/s | |
test_setitem | 39.7710μs | 17.7178μs | 56.4405 KOps/s | 64.8834 KOps/s | |
test_set | 49.8510μs | 17.1461μs | 58.3224 KOps/s | 67.0366 KOps/s | |
test_set_shared | 1.7460ms | 0.1020ms | 9.8052 KOps/s | 10.1505 KOps/s | |
test_update | 89.8020μs | 19.8198μs | 50.4547 KOps/s | 61.0320 KOps/s | |
test_update_nested | 0.1495ms | 25.4256μs | 39.3305 KOps/s | 46.6335 KOps/s | |
test_update__nested | 50.7910μs | 23.8486μs | 41.9312 KOps/s | 44.6080 KOps/s | |
test_set_nested | 46.9510μs | 18.4039μs | 54.3362 KOps/s | 62.0466 KOps/s | |
test_set_nested_new | 56.6010μs | 21.0582μs | 47.4874 KOps/s | 53.1709 KOps/s | |
test_select | 61.9310μs | 33.8932μs | 29.5044 KOps/s | 30.8432 KOps/s | |
test_select_nested | 0.8574ms | 54.2654μs | 18.4280 KOps/s | 18.2346 KOps/s | |
test_exclude_nested | 0.1364ms | 0.1092ms | 9.1567 KOps/s | 8.9904 KOps/s | |
test_empty[True] | 0.4138ms | 0.3583ms | 2.7906 KOps/s | 2.8217 KOps/s | |
test_empty[False] | 7.3292μs | 0.8643μs | 1.1571 MOps/s | 1.1505 MOps/s | |
test_to | 0.1037ms | 80.7115μs | 12.3898 KOps/s | 12.4146 KOps/s | |
test_to_nonblocking | 0.2162ms | 63.0749μs | 15.8542 KOps/s | 16.4347 KOps/s | |
test_unbind_speed | 0.9399ms | 0.2932ms | 3.4110 KOps/s | 3.6969 KOps/s | |
test_unbind_speed_stack0 | 0.3424ms | 0.2823ms | 3.5422 KOps/s | 3.7205 KOps/s | |
test_unbind_speed_stack1 | 80.4246ms | 0.8440ms | 1.1848 KOps/s | 1.2367 KOps/s | |
test_split | 77.3589ms | 1.7398ms | 574.7630 Ops/s | 596.9983 Ops/s | |
test_chunk | 80.1812ms | 1.7518ms | 570.8403 Ops/s | 594.9249 Ops/s | |
test_creation[device0] | 0.1571ms | 63.2907μs | 15.8001 KOps/s | 16.7703 KOps/s | |
test_creation_from_tensor | 0.2080ms | 59.9503μs | 16.6805 KOps/s | 18.2026 KOps/s | |
test_add_one[memmap_tensor0] | 78.7420μs | 7.9919μs | 125.1273 KOps/s | 140.0274 KOps/s | |
test_contiguous[memmap_tensor0] | 60.3510μs | 0.7251μs | 1.3792 MOps/s | 1.4099 MOps/s | |
test_stack[memmap_tensor0] | 31.7510μs | 5.3260μs | 187.7580 KOps/s | 205.0429 KOps/s | |
test_memmaptd_index | 1.1244ms | 0.3036ms | 3.2938 KOps/s | 3.3876 KOps/s | |
test_memmaptd_index_astensor | 0.6412ms | 0.3743ms | 2.6718 KOps/s | 2.7317 KOps/s | |
test_memmaptd_index_op | 1.2041ms | 0.7139ms | 1.4008 KOps/s | 1.5658 KOps/s | |
test_serialize_model | 0.1886s | 0.1139s | 8.7760 Ops/s | 8.5266 Ops/s | |
test_serialize_model_pickle | 1.3497s | 1.2369s | 0.8085 Ops/s | 0.8084 Ops/s | |
test_serialize_weights | 0.1850s | 0.1111s | 9.0049 Ops/s | 8.7218 Ops/s | |
test_serialize_weights_returnearly | 0.2862s | 0.1047s | 9.5481 Ops/s | 10.4682 Ops/s | |
test_serialize_weights_pickle | 1.3535s | 1.2486s | 0.8009 Ops/s | 0.8043 Ops/s | |
test_reshape_pytree | 59.0020μs | 27.1501μs | 36.8323 KOps/s | 37.8982 KOps/s | |
test_reshape_td | 0.1710ms | 35.0193μs | 28.5557 KOps/s | 32.4117 KOps/s | |
test_view_pytree | 0.1152ms | 26.7026μs | 37.4496 KOps/s | 38.6825 KOps/s | |
test_view_td | 0.1472ms | 38.1215μs | 26.2319 KOps/s | 26.8600 KOps/s | |
test_unbind_pytree | 0.1749ms | 33.4904μs | 29.8593 KOps/s | 31.0183 KOps/s | |
test_unbind_td | 0.4617ms | 48.6825μs | 20.5412 KOps/s | 23.8535 KOps/s | |
test_split_pytree | 59.9310μs | 36.6380μs | 27.2941 KOps/s | 29.2774 KOps/s | |
test_split_td | 0.5087ms | 41.5670μs | 24.0576 KOps/s | 25.3565 KOps/s | |
test_add_pytree | 78.2010μs | 42.9499μs | 23.2829 KOps/s | 25.3149 KOps/s | |
test_add_td | 0.1767ms | 56.5878μs | 17.6716 KOps/s | 19.8575 KOps/s | |
test_distributed | 3.4728ms | 90.9660μs | 10.9931 KOps/s | 11.5703 KOps/s | |
test_tdmodule | 36.1710μs | 16.1012μs | 62.1073 KOps/s | 71.6994 KOps/s | |
test_tdmodule_dispatch | 51.5610μs | 31.4489μs | 31.7976 KOps/s | 37.5229 KOps/s | |
test_tdseq | 34.8110μs | 17.6150μs | 56.7699 KOps/s | 63.7668 KOps/s | |
test_tdseq_dispatch | 0.1411ms | 33.7021μs | 29.6718 KOps/s | 33.0833 KOps/s | |
test_instantiation_functorch | 1.7128ms | 1.5530ms | 643.9117 Ops/s | 646.4164 Ops/s | |
test_instantiation_td | 1.5141ms | 1.0587ms | 944.5693 Ops/s | 867.5081 Ops/s | |
test_exec_functorch | 0.3008ms | 0.1596ms | 6.2645 KOps/s | 6.4577 KOps/s | |
test_exec_functional_call | 0.2129ms | 0.1478ms | 6.7663 KOps/s | 6.8090 KOps/s | |
test_exec_td | 0.2266ms | 0.1464ms | 6.8293 KOps/s | 6.7754 KOps/s | |
test_exec_td_decorator | 0.5513ms | 0.2208ms | 4.5298 KOps/s | 4.5068 KOps/s | |
test_vmap_mlp_speed[True-True] | 1.4791ms | 0.6207ms | 1.6110 KOps/s | 1.6430 KOps/s | |
test_vmap_mlp_speed[True-False] | 0.7948ms | 0.6193ms | 1.6146 KOps/s | 1.6623 KOps/s | |
test_vmap_mlp_speed[False-True] | 0.6847ms | 0.5466ms | 1.8294 KOps/s | 1.8664 KOps/s | |
test_vmap_mlp_speed[False-False] | 0.6974ms | 0.5463ms | 1.8305 KOps/s | 1.8627 KOps/s | |
test_vmap_mlp_speed_decorator[True-True] | 92.7417ms | 0.7518ms | 1.3302 KOps/s | 1.5070 KOps/s | |
test_vmap_mlp_speed_decorator[True-False] | 0.8198ms | 0.6848ms | 1.4603 KOps/s | 1.5111 KOps/s | |
test_vmap_mlp_speed_decorator[False-True] | 0.8700ms | 0.6025ms | 1.6598 KOps/s | 1.6846 KOps/s | |
test_vmap_mlp_speed_decorator[False-False] | 0.7665ms | 0.6038ms | 1.6561 KOps/s | 1.6886 KOps/s | |
test_vmap_transformer_speed[True-True] | 8.6236ms | 8.2598ms | 121.0682 Ops/s | 123.1357 Ops/s | |
test_vmap_transformer_speed[True-False] | 8.4939ms | 8.2682ms | 120.9452 Ops/s | 123.2224 Ops/s | |
test_vmap_transformer_speed[False-True] | 8.7406ms | 8.2947ms | 120.5588 Ops/s | 124.0884 Ops/s | |
test_vmap_transformer_speed[False-False] | 8.6351ms | 8.2469ms | 121.2570 Ops/s | 124.4378 Ops/s | |
test_vmap_transformer_speed_decorator[True-True] | 20.4464ms | 20.0919ms | 49.7714 Ops/s | 50.8129 Ops/s | |
test_vmap_transformer_speed_decorator[True-False] | 20.3532ms | 20.0844ms | 49.7899 Ops/s | 50.8793 Ops/s | |
test_vmap_transformer_speed_decorator[False-True] | 20.9645ms | 20.0168ms | 49.9580 Ops/s | 50.6255 Ops/s | |
test_vmap_transformer_speed_decorator[False-False] | 20.8398ms | 19.9809ms | 50.0477 Ops/s | 51.0941 Ops/s | |
test_to_module_speed[True] | 1.6667ms | 1.5282ms | 654.3656 Ops/s | 663.3608 Ops/s | |
test_to_module_speed[False] | 1.6367ms | 1.5193ms | 658.2103 Ops/s | 671.5445 Ops/s |
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.
enhancement
New feature or request
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.