[Store] Rename to TensorDictStore, add Dragonfly/KeyDB backend support#1574
Closed
vmoens wants to merge 3 commits intoredis-lazy-stackfrom
Closed
[Store] Rename to TensorDictStore, add Dragonfly/KeyDB backend support#1574vmoens wants to merge 3 commits intoredis-lazy-stackfrom
vmoens wants to merge 3 commits intoredis-lazy-stackfrom
Conversation
Contributor
|
| Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
|---|---|---|---|---|---|
| test_plain_set_nested | 33.4220μs | 14.8206μs | 67.4736 KOps/s | 68.6562 KOps/s | |
| test_plain_set_stack_nested | 38.6520μs | 15.0228μs | 66.5655 KOps/s | 67.6288 KOps/s | |
| test_plain_set_nested_inplace | 42.4220μs | 16.5490μs | 60.4265 KOps/s | 61.8061 KOps/s | |
| test_plain_set_stack_nested_inplace | 52.2830μs | 16.4491μs | 60.7936 KOps/s | 61.0683 KOps/s | |
| test_items | 28.8620μs | 5.7717μs | 173.2592 KOps/s | 171.9961 KOps/s | |
| test_items_nested | 0.5135ms | 0.4591ms | 2.1780 KOps/s | 2.2006 KOps/s | |
| test_items_nested_locked | 0.5061ms | 0.4586ms | 2.1806 KOps/s | 2.1792 KOps/s | |
| test_items_nested_leaf | 0.1287ms | 96.5279μs | 10.3597 KOps/s | 10.4315 KOps/s | |
| test_items_stack_nested | 0.5158ms | 0.4616ms | 2.1664 KOps/s | 2.1565 KOps/s | |
| test_items_stack_nested_leaf | 0.1347ms | 97.1408μs | 10.2943 KOps/s | 10.5585 KOps/s | |
| test_items_stack_nested_locked | 0.5208ms | 0.4595ms | 2.1764 KOps/s | 2.1584 KOps/s | |
| test_keys | 33.8520μs | 4.1983μs | 238.1924 KOps/s | 237.3007 KOps/s | |
| test_keys_nested | 0.1763ms | 0.1214ms | 8.2383 KOps/s | 8.3844 KOps/s | |
| test_keys_nested_locked | 0.6900ms | 0.1312ms | 7.6197 KOps/s | 7.7533 KOps/s | |
| test_keys_nested_leaf | 0.1545ms | 0.1122ms | 8.9152 KOps/s | 9.2129 KOps/s | |
| test_keys_stack_nested | 0.1692ms | 0.1216ms | 8.2245 KOps/s | 8.3675 KOps/s | |
| test_keys_stack_nested_leaf | 0.1742ms | 0.1101ms | 9.0826 KOps/s | 9.1135 KOps/s | |
| test_keys_stack_nested_locked | 0.1804ms | 0.1309ms | 7.6402 KOps/s | 7.7278 KOps/s | |
| test_values | 6.6442μs | 1.0132μs | 986.9364 KOps/s | 985.0846 KOps/s | |
| test_values_nested | 73.9240μs | 48.3197μs | 20.6955 KOps/s | 20.9499 KOps/s | |
| test_values_nested_locked | 79.2940μs | 51.5688μs | 19.3916 KOps/s | 19.4974 KOps/s | |
| test_values_nested_leaf | 93.8240μs | 55.4762μs | 18.0258 KOps/s | 18.4376 KOps/s | |
| test_values_stack_nested | 77.6340μs | 48.7819μs | 20.4994 KOps/s | 20.8732 KOps/s | |
| test_values_stack_nested_leaf | 88.3550μs | 55.5072μs | 18.0157 KOps/s | 18.6428 KOps/s | |
| test_values_stack_nested_locked | 78.2640μs | 52.0385μs | 19.2165 KOps/s | 19.7262 KOps/s | |
| test_membership | 6.0418μs | 0.8642μs | 1.1571 MOps/s | 1.1794 MOps/s | |
| test_membership_nested | 25.7410μs | 2.9093μs | 343.7196 KOps/s | 345.4439 KOps/s | |
| test_membership_nested_leaf | 31.6510μs | 2.9076μs | 343.9270 KOps/s | 344.1498 KOps/s | |
| test_membership_stacked_nested | 28.8420μs | 2.9286μs | 341.4578 KOps/s | 340.9804 KOps/s | |
| test_membership_stacked_nested_leaf | 54.8630μs | 2.9153μs | 343.0123 KOps/s | 340.0546 KOps/s | |
| test_membership_nested_last | 30.7410μs | 4.3609μs | 229.3106 KOps/s | 228.4372 KOps/s | |
| test_membership_nested_leaf_last | 33.4810μs | 4.3712μs | 228.7682 KOps/s | 231.5344 KOps/s | |
| test_membership_stacked_nested_last | 30.9020μs | 4.3702μs | 228.8226 KOps/s | 230.6444 KOps/s | |
| test_membership_stacked_nested_leaf_last | 36.1420μs | 4.3501μs | 229.8783 KOps/s | 230.6299 KOps/s | |
| test_nested_getleaf | 51.7730μs | 21.5242μs | 46.4593 KOps/s | 47.3525 KOps/s | |
| test_nested_get | 53.5630μs | 20.5209μs | 48.7307 KOps/s | 49.3504 KOps/s | |
| test_stacked_getleaf | 49.1620μs | 21.4632μs | 46.5913 KOps/s | 47.5113 KOps/s | |
| test_stacked_get | 48.3920μs | 20.3976μs | 49.0253 KOps/s | 48.4757 KOps/s | |
| test_nested_getitemleaf | 50.5930μs | 21.9686μs | 45.5195 KOps/s | 46.6260 KOps/s | |
| test_nested_getitem | 41.5620μs | 20.8281μs | 48.0121 KOps/s | 49.0522 KOps/s | |
| test_stacked_getitemleaf | 49.6530μs | 21.9923μs | 45.4704 KOps/s | 46.3291 KOps/s | |
| test_stacked_getitem | 51.0530μs | 20.9739μs | 47.6784 KOps/s | 48.3701 KOps/s | |
| test_lock_nested | 7.9914ms | 0.4765ms | 2.0987 KOps/s | 2.0875 KOps/s | |
| test_lock_stack_nested | 0.5442ms | 0.4796ms | 2.0850 KOps/s | 2.0699 KOps/s | |
| test_unlock_nested | 0.6225ms | 0.3825ms | 2.6142 KOps/s | 2.6176 KOps/s | |
| test_unlock_stack_nested | 0.4197ms | 0.3860ms | 2.5910 KOps/s | 2.5710 KOps/s | |
| test_flatten_speed | 0.1738ms | 0.1235ms | 8.0963 KOps/s | 8.1524 KOps/s | |
| test_unflatten_speed | 0.6310ms | 0.5740ms | 1.7422 KOps/s | 1.7254 KOps/s | |
| test_common_ops | 0.8666ms | 0.6849ms | 1.4601 KOps/s | 1.4470 KOps/s | |
| test_creation | 68.9540μs | 2.8725μs | 348.1262 KOps/s | 339.6771 KOps/s | |
| test_creation_empty | 29.3320μs | 6.1380μs | 162.9195 KOps/s | 161.2300 KOps/s | |
| test_creation_nested_1 | 40.2420μs | 10.6091μs | 94.2584 KOps/s | 94.4712 KOps/s | |
| test_creation_nested_2 | 43.5520μs | 12.0161μs | 83.2215 KOps/s | 83.7908 KOps/s | |
| test_creation_many_keys[10] | 47.6730μs | 18.0593μs | 55.3730 KOps/s | 54.7068 KOps/s | |
| test_creation_many_keys[50] | 0.1011ms | 77.8492μs | 12.8453 KOps/s | 12.7872 KOps/s | |
| test_creation_many_keys[100] | 0.1906ms | 0.1532ms | 6.5291 KOps/s | 6.5074 KOps/s | |
| test_creation_nested_many_keys[10] | 69.0530μs | 39.1820μs | 25.5219 KOps/s | 25.3139 KOps/s | |
| test_creation_nested_many_keys[50] | 0.2441ms | 0.1597ms | 6.2604 KOps/s | 6.1900 KOps/s | |
| test_clone | 54.7830μs | 13.6527μs | 73.2457 KOps/s | 71.6193 KOps/s | |
| test_getitem[int] | 1.5705ms | 14.5494μs | 68.7312 KOps/s | 55.3081 KOps/s | |
| test_getitem[slice_int] | 0.1420ms | 24.6817μs | 40.5158 KOps/s | 40.4439 KOps/s | |
| test_getitem[range] | 0.1718ms | 62.0578μs | 16.1140 KOps/s | 15.8401 KOps/s | |
| test_getitem[tuple] | 0.1448ms | 24.1731μs | 41.3683 KOps/s | 41.2835 KOps/s | |
| test_getitem[list] | 0.1890ms | 58.3820μs | 17.1286 KOps/s | 17.1180 KOps/s | |
| test_setitem_dim[int] | 46.0630μs | 26.0332μs | 38.4125 KOps/s | 37.6271 KOps/s | |
| test_setitem_dim[slice_int] | 64.2330μs | 43.5380μs | 22.9684 KOps/s | 22.3686 KOps/s | |
| test_setitem_dim[range] | 0.1182ms | 93.4417μs | 10.7019 KOps/s | 10.5728 KOps/s | |
| test_setitem_dim[tuple] | 63.8440μs | 40.4999μs | 24.6914 KOps/s | 24.0308 KOps/s | |
| test_setitem | 64.1630μs | 17.9347μs | 55.7578 KOps/s | 54.7059 KOps/s | |
| test_set | 65.2430μs | 17.2068μs | 58.1166 KOps/s | 57.4904 KOps/s | |
| test_set_shared | 0.5617ms | 0.2054ms | 4.8677 KOps/s | 4.8572 KOps/s | |
| test_update | 0.3536ms | 21.9244μs | 45.6113 KOps/s | 45.1899 KOps/s | |
| test_update_nested | 80.7740μs | 34.2931μs | 29.1603 KOps/s | 29.3039 KOps/s | |
| test_update__nested | 0.5432ms | 35.2538μs | 28.3657 KOps/s | 27.6580 KOps/s | |
| test_set_nested | 61.1230μs | 19.1608μs | 52.1899 KOps/s | 50.8499 KOps/s | |
| test_set_nested_new | 89.1840μs | 24.4639μs | 40.8765 KOps/s | 39.6702 KOps/s | |
| test_select | 92.4150μs | 41.5904μs | 24.0440 KOps/s | 23.4770 KOps/s | |
| test_select_nested | 0.1115ms | 75.0637μs | 13.3220 KOps/s | 13.3266 KOps/s | |
| test_exclude_nested | 0.1367ms | 92.7260μs | 10.7845 KOps/s | 10.8090 KOps/s | |
| test_empty[True] | 0.4575ms | 0.3914ms | 2.5549 KOps/s | 2.5486 KOps/s | |
| test_empty[False] | 8.0305μs | 1.3348μs | 749.1564 KOps/s | 762.1633 KOps/s | |
| test_to | 0.1044ms | 71.2749μs | 14.0302 KOps/s | 13.7240 KOps/s | |
| test_to_nonblocking | 1.3100ms | 65.0352μs | 15.3763 KOps/s | 15.4110 KOps/s | |
| test_unbind_speed | 0.3955ms | 0.3258ms | 3.0692 KOps/s | 3.0595 KOps/s | |
| test_unbind_speed_stack0 | 0.3898ms | 0.3233ms | 3.0929 KOps/s | 3.0627 KOps/s | |
| test_unbind_speed_stack1 | 0.1041s | 1.0441ms | 957.7706 Ops/s | 1.1897 KOps/s | |
| test_split | 1.2131ms | 1.1486ms | 870.6384 Ops/s | 781.0295 Ops/s | |
| test_chunk | 0.1039s | 1.2179ms | 821.1183 Ops/s | 915.9203 Ops/s | |
| test_to_cpu_blocking | 28.6374ms | 28.5244ms | 35.0577 Ops/s | 35.0929 Ops/s | |
| test_to_cpu_global_sync | 11.3949ms | 11.3003ms | 88.4932 Ops/s | 77.5638 Ops/s | |
| test_to_cpu_event_sync | 0.1158s | 13.5442ms | 73.8321 Ops/s | 79.1139 Ops/s | |
| test_to_cpu_default | 12.5488ms | 12.3169ms | 81.1896 Ops/s | 79.0742 Ops/s | |
| test_consolidate[False-None] | 4.3190ms | 4.1385ms | 241.6336 Ops/s | 218.7447 Ops/s | |
| test_consolidate[default-None] | 2.1399ms | 2.0255ms | 493.7033 Ops/s | 476.5935 Ops/s | |
| test_consolidate[reduce-overhead-None] | 2.0184ms | 1.9546ms | 511.6018 Ops/s | 505.0792 Ops/s | |
| test_consolidate_njt[False-None] | 8.6692ms | 8.4811ms | 117.9098 Ops/s | 118.3551 Ops/s | |
| test_to[False-False-None] | 2.1634ms | 2.0581ms | 485.8865 Ops/s | 468.1805 Ops/s | |
| test_to[True-False-None] | 2.1804ms | 1.9228ms | 520.0722 Ops/s | 518.2630 Ops/s | |
| test_to[within-False-None] | 6.2174ms | 6.1366ms | 162.9557 Ops/s | 163.0601 Ops/s | |
| test_to[True-default-None] | 7.7518ms | 7.5832ms | 131.8710 Ops/s | 129.5926 Ops/s | |
| test_to_njt[False-False-None] | 8.6014ms | 8.5141ms | 117.4515 Ops/s | 116.4145 Ops/s | |
| test_to_njt[True-False-None] | 7.0927ms | 6.9237ms | 144.4314 Ops/s | 144.6418 Ops/s | |
| test_to_njt[within-False-None] | 15.7153ms | 15.4585ms | 64.6891 Ops/s | 64.0361 Ops/s | |
| test_creation[device0] | 0.3927ms | 0.1157ms | 8.6448 KOps/s | 8.6595 KOps/s | |
| test_creation_from_tensor | 0.4108ms | 0.1132ms | 8.8302 KOps/s | 8.8782 KOps/s | |
| test_add_one[memmap_tensor0] | 0.2105ms | 6.5259μs | 153.2353 KOps/s | 147.7280 KOps/s | |
| test_contiguous[memmap_tensor0] | 12.4900μs | 0.6719μs | 1.4884 MOps/s | 2.1627 MOps/s | |
| test_stack[memmap_tensor0] | 34.2520μs | 4.6692μs | 214.1705 KOps/s | 216.6880 KOps/s | |
| test_memmaptd_index | 0.9407ms | 0.2675ms | 3.7383 KOps/s | 3.8214 KOps/s | |
| test_memmaptd_index_astensor | 0.5124ms | 0.3625ms | 2.7582 KOps/s | 2.8046 KOps/s | |
| test_memmaptd_index_op | 0.8598ms | 0.6055ms | 1.6514 KOps/s | 1.6369 KOps/s | |
| test_serialize_model | 0.1387s | 0.1366s | 7.3207 Ops/s | 7.2522 Ops/s | |
| test_serialize_model_pickle | 1.8879s | 1.3018s | 0.7682 Ops/s | 0.8387 Ops/s | |
| test_serialize_weights | 0.1363s | 0.1347s | 7.4266 Ops/s | 7.2865 Ops/s | |
| test_serialize_weights_returnearly | 0.4330s | 95.2281ms | 10.5011 Ops/s | 10.7630 Ops/s | |
| test_serialize_weights_pickle | 1.3683s | 1.2140s | 0.8237 Ops/s | 0.8391 Ops/s | |
| test_reshape_pytree | 0.2070ms | 33.1223μs | 30.1911 KOps/s | 29.7111 KOps/s | |
| test_reshape_td | 80.3440μs | 44.9452μs | 22.2493 KOps/s | 22.2429 KOps/s | |
| test_view_pytree | 0.2287ms | 33.0404μs | 30.2660 KOps/s | 29.8625 KOps/s | |
| test_view_td | 89.0140μs | 53.3434μs | 18.7465 KOps/s | 18.9302 KOps/s | |
| test_unbind_pytree | 0.2353ms | 36.6746μs | 27.2669 KOps/s | 27.0168 KOps/s | |
| test_unbind_td | 0.1012ms | 48.5486μs | 20.5979 KOps/s | 20.2417 KOps/s | |
| test_split_pytree | 0.2006ms | 42.5766μs | 23.4871 KOps/s | 23.1629 KOps/s | |
| test_split_td | 0.1499ms | 65.7210μs | 15.2158 KOps/s | 15.3827 KOps/s | |
| test_add_pytree | 0.1949ms | 41.8332μs | 23.9045 KOps/s | 23.4091 KOps/s | |
| test_add_td | 0.1006ms | 53.0310μs | 18.8569 KOps/s | 18.3273 KOps/s | |
| test_compile_add_one_nested[tensordict-compile] | 0.2192ms | 0.1384ms | 7.2251 KOps/s | 6.9740 KOps/s | |
| test_compile_add_one_nested[tensordict-eager] | 0.3873ms | 0.1941ms | 5.1509 KOps/s | 5.1238 KOps/s | |
| test_compile_add_one_nested[pytree-compile] | 0.5496ms | 0.1088ms | 9.1944 KOps/s | 9.0634 KOps/s | |
| test_compile_add_one_nested[pytree-eager] | 0.6117ms | 0.1803ms | 5.5464 KOps/s | 5.4422 KOps/s | |
| test_compile_copy_nested[tensordict-compile] | 79.3740μs | 31.1367μs | 32.1164 KOps/s | 32.0262 KOps/s | |
| test_compile_copy_nested[tensordict-eager] | 93.6840μs | 53.5249μs | 18.6829 KOps/s | 18.9772 KOps/s | |
| test_compile_copy_nested[pytree-compile] | 87.2650μs | 10.0681μs | 99.3235 KOps/s | 102.3195 KOps/s | |
| test_compile_copy_nested[pytree-eager] | 0.4633ms | 68.6231μs | 14.5724 KOps/s | 14.1759 KOps/s | |
| test_compile_add_one_flat[tensordict-compile] | 0.2382ms | 0.1766ms | 5.6637 KOps/s | 5.3210 KOps/s | |
| test_compile_add_one_flat[tensordict-eager] | 0.3038ms | 0.2535ms | 3.9447 KOps/s | 3.7512 KOps/s | |
| test_compile_add_one_flat[tensorclass-compile] | 0.1888ms | 0.1164ms | 8.5883 KOps/s | 8.1651 KOps/s | |
| test_compile_add_one_flat[tensorclass-eager] | 0.1181ms | 72.3824μs | 13.8155 KOps/s | 14.2433 KOps/s | |
| test_compile_add_one_flat[pytree-compile] | 0.2123ms | 0.1602ms | 6.2435 KOps/s | 6.1333 KOps/s | |
| test_compile_add_one_flat[pytree-eager] | 0.8187ms | 0.5407ms | 1.8496 KOps/s | 1.8280 KOps/s | |
| test_compile_add_self_flat[tensordict-eager] | 0.3599ms | 0.3067ms | 3.2610 KOps/s | 3.0699 KOps/s | |
| test_compile_add_self_flat[tensordict-compile] | 0.2259ms | 0.1806ms | 5.5383 KOps/s | 5.2876 KOps/s | |
| test_compile_add_self_flat[tensorclass-eager] | 0.2014ms | 84.4662μs | 11.8391 KOps/s | 11.5913 KOps/s | |
| test_compile_add_self_flat[tensorclass-compile] | 0.1797ms | 0.1196ms | 8.3591 KOps/s | 8.1997 KOps/s | |
| test_compile_add_self_flat[pytree-eager] | 0.7311ms | 0.4554ms | 2.1960 KOps/s | 2.2330 KOps/s | |
| test_compile_add_self_flat[pytree-compile] | 0.3036ms | 0.1634ms | 6.1215 KOps/s | 6.1440 KOps/s | |
| test_compile_copy_flat[tensordict-compile] | 0.1096ms | 24.5063μs | 40.8059 KOps/s | 38.8297 KOps/s | |
| test_compile_copy_flat[tensordict-eager] | 0.1550ms | 41.4645μs | 24.1170 KOps/s | 24.2058 KOps/s | |
| test_compile_copy_flat[pytree-compile] | 0.1292ms | 11.1228μs | 89.9056 KOps/s | 90.5846 KOps/s | |
| test_compile_copy_flat[pytree-eager] | 0.3932ms | 52.4642μs | 19.0606 KOps/s | 19.1409 KOps/s | |
| test_compile_assign_and_add[tensordict-compile] | 2.0486ms | 0.1803ms | 5.5448 KOps/s | 5.2296 KOps/s | |
| test_compile_assign_and_add[tensordict-eager] | 3.6474ms | 3.3302ms | 300.2852 Ops/s | 297.9017 Ops/s | |
| test_compile_assign_and_add[pytree-compile] | 2.0388ms | 0.1672ms | 5.9825 KOps/s | 5.9960 KOps/s | |
| test_compile_assign_and_add[pytree-eager] | 3.6917ms | 2.8303ms | 353.3165 Ops/s | 351.6843 Ops/s | |
| test_compile_indexing[tensor-tensordict-compile] | 0.2480ms | 0.1129ms | 8.8563 KOps/s | 9.0352 KOps/s | |
| test_compile_indexing[tensor-tensordict-eager] | 0.3124ms | 76.3323μs | 13.1006 KOps/s | 13.6753 KOps/s | |
| test_compile_indexing[tensor-tensorclass-compile] | 0.2193ms | 99.5056μs | 10.0497 KOps/s | 10.2996 KOps/s | |
| test_compile_indexing[tensor-tensorclass-eager] | 0.2955ms | 45.7274μs | 21.8687 KOps/s | 20.6776 KOps/s | |
| test_compile_indexing[tensor-pytree-compile] | 0.2119ms | 99.4059μs | 10.0598 KOps/s | 9.7747 KOps/s | |
| test_compile_indexing[tensor-pytree-eager] | 0.2644ms | 45.3626μs | 22.0446 KOps/s | 20.6022 KOps/s | |
| test_compile_indexing[slice-tensordict-compile] | 0.1744ms | 58.9812μs | 16.9546 KOps/s | 16.8727 KOps/s | |
| test_compile_indexing[slice-tensordict-eager] | 0.2248ms | 27.8969μs | 35.8462 KOps/s | 34.3356 KOps/s | |
| test_compile_indexing[slice-tensorclass-compile] | 0.2044ms | 45.9875μs | 21.7450 KOps/s | 20.7271 KOps/s | |
| test_compile_indexing[slice-tensorclass-eager] | 0.2661ms | 22.4500μs | 44.5435 KOps/s | 43.1522 KOps/s | |
| test_compile_indexing[slice-pytree-compile] | 0.1048ms | 46.0995μs | 21.6922 KOps/s | 20.5493 KOps/s | |
| test_compile_indexing[slice-pytree-eager] | 0.2478ms | 22.5691μs | 44.3084 KOps/s | 42.9471 KOps/s | |
| test_compile_indexing[int-tensordict-compile] | 94.6240μs | 56.7196μs | 17.6306 KOps/s | 16.7517 KOps/s | |
| test_compile_indexing[int-tensordict-eager] | 0.2961ms | 27.7045μs | 36.0952 KOps/s | 34.2871 KOps/s | |
| test_compile_indexing[int-tensorclass-compile] | 84.3250μs | 46.4099μs | 21.5471 KOps/s | 20.7454 KOps/s | |
| test_compile_indexing[int-tensorclass-eager] | 0.2580ms | 22.3812μs | 44.6804 KOps/s | 43.0707 KOps/s | |
| test_compile_indexing[int-pytree-compile] | 82.8640μs | 45.8273μs | 21.8210 KOps/s | 20.6638 KOps/s | |
| test_compile_indexing[int-pytree-eager] | 0.2781ms | 22.5683μs | 44.3099 KOps/s | 42.2435 KOps/s | |
| test_mod_add[eager] | 90.0940μs | 50.2057μs | 19.9181 KOps/s | 18.9502 KOps/s | |
| test_mod_add[compile] | 0.2082ms | 0.1039ms | 9.6217 KOps/s | 9.3684 KOps/s | |
| test_mod_add[compile-overhead] | 0.3155ms | 0.1479ms | 6.7595 KOps/s | 6.6406 KOps/s | |
| test_mod_wrap[eager] | 0.3794ms | 0.2913ms | 3.4325 KOps/s | 3.3788 KOps/s | |
| test_mod_wrap[compile] | 0.5072ms | 0.3485ms | 2.8693 KOps/s | 2.8361 KOps/s | |
| test_mod_wrap[compile-overhead] | 7.2523ms | 4.0103ms | 249.3574 Ops/s | 248.7282 Ops/s | |
| test_mod_wrap_and_backward[eager] | 1.6527ms | 1.5011ms | 666.1730 Ops/s | 623.8851 Ops/s | |
| test_mod_wrap_and_backward[compile] | 1.5632ms | 1.4532ms | 688.1336 Ops/s | 676.7470 Ops/s | |
| test_mod_wrap_and_backward[compile-overhead] | 1.2421ms | 0.8890ms | 1.1249 KOps/s | 1.1045 KOps/s | |
| test_seq_add[eager] | 0.2022ms | 0.1551ms | 6.4479 KOps/s | 6.3346 KOps/s | |
| test_seq_add[compile] | 0.1880ms | 0.1143ms | 8.7503 KOps/s | 8.3625 KOps/s | |
| test_seq_add[compile-overhead] | 0.3536ms | 0.1548ms | 6.4591 KOps/s | 6.2952 KOps/s | |
| test_seq_wrap[eager] | 0.6181ms | 0.5209ms | 1.9198 KOps/s | 1.8433 KOps/s | |
| test_seq_wrap[compile] | 0.4396ms | 0.3712ms | 2.6937 KOps/s | 2.6812 KOps/s | |
| test_seq_wrap[compile-overhead] | 0.3472ms | 0.2688ms | 3.7209 KOps/s | 3.7148 KOps/s | |
| test_func_call_runtime[False-eager] | 0.9549ms | 0.8513ms | 1.1747 KOps/s | 1.1249 KOps/s | |
| test_func_call_runtime[False-compile] | 1.0381ms | 0.9350ms | 1.0696 KOps/s | 1.0879 KOps/s | |
| test_func_call_runtime[False-compile-overhead] | 0.5118ms | 0.4598ms | 2.1751 KOps/s | 2.1531 KOps/s | |
| test_func_call_runtime[True-eager] | 1.2436ms | 1.0819ms | 924.3012 Ops/s | 913.5184 Ops/s | |
| test_func_call_runtime[True-compile] | 1.0921ms | 0.9295ms | 1.0759 KOps/s | 1.0789 KOps/s | |
| test_func_call_runtime[True-compile-overhead] | 0.5294ms | 0.4718ms | 2.1194 KOps/s | 2.0849 KOps/s | |
| test_func_call_cm_runtime[False-eager] | 0.9559ms | 0.8422ms | 1.1873 KOps/s | 1.1173 KOps/s | |
| test_func_call_cm_runtime[False-compile] | 1.0261ms | 0.9324ms | 1.0725 KOps/s | 1.0817 KOps/s | |
| test_func_call_cm_runtime[False-compile-overhead] | 0.5106ms | 0.4601ms | 2.1734 KOps/s | 2.1438 KOps/s | |
| test_func_call_cm_runtime[True-eager] | 1.3359ms | 1.2246ms | 816.6023 Ops/s | 801.6344 Ops/s | |
| test_func_call_cm_runtime[True-compile] | 1.0605ms | 0.9570ms | 1.0450 KOps/s | 1.0362 KOps/s | |
| test_func_call_cm_runtime[True-compile-overhead] | 0.5822ms | 0.5073ms | 1.9714 KOps/s | 1.9506 KOps/s | |
| test_vmap_func_call_cm_runtime[eager] | 2.8708ms | 2.3708ms | 421.8058 Ops/s | 416.9175 Ops/s | |
| test_vmap_func_call_cm_runtime[compile] | 1.1348ms | 0.9750ms | 1.0256 KOps/s | 1.0150 KOps/s | |
| test_vmap_func_call_cm_runtime[compile-overhead] | 0.6220ms | 0.5100ms | 1.9609 KOps/s | 1.9222 KOps/s | |
| test_distributed | 0.5624ms | 0.1524ms | 6.5620 KOps/s | 6.4958 KOps/s | |
| test_tdmodule | 58.1230μs | 28.1444μs | 35.5310 KOps/s | 35.5317 KOps/s | |
| test_tdmodule_dispatch | 95.9550μs | 45.2413μs | 22.1037 KOps/s | 21.8669 KOps/s | |
| test_tdseq | 47.9130μs | 27.3711μs | 36.5349 KOps/s | 36.3065 KOps/s | |
| test_tdseq_dispatch | 69.9330μs | 47.7275μs | 20.9523 KOps/s | 20.8195 KOps/s | |
| test_instantiation_functorch | 2.2638ms | 2.0648ms | 484.3066 Ops/s | 478.4747 Ops/s | |
| test_exec_functorch | 0.2580ms | 0.1799ms | 5.5591 KOps/s | 5.4198 KOps/s | |
| test_exec_functional_call | 0.2140ms | 0.1628ms | 6.1410 KOps/s | 6.0193 KOps/s | |
| test_exec_td_decorator | 0.4393ms | 0.2366ms | 4.2264 KOps/s | 4.1181 KOps/s | |
| test_vmap_mlp_speed_decorator[True-True] | 1.0043ms | 0.8217ms | 1.2169 KOps/s | 1.1962 KOps/s | |
| test_vmap_mlp_speed_decorator[True-False] | 0.9908ms | 0.8198ms | 1.2198 KOps/s | 1.1975 KOps/s | |
| test_vmap_mlp_speed_decorator[False-True] | 1.0008ms | 0.7137ms | 1.4012 KOps/s | 1.3838 KOps/s | |
| test_vmap_mlp_speed_decorator[False-False] | 1.1317ms | 0.7142ms | 1.4001 KOps/s | 1.3837 KOps/s | |
| test_vmap_transformer_speed_decorator[True-True] | 21.4708ms | 20.6147ms | 48.5090 Ops/s | 48.0425 Ops/s | |
| test_vmap_transformer_speed_decorator[True-False] | 21.0207ms | 20.5988ms | 48.5465 Ops/s | 48.0161 Ops/s | |
| test_vmap_transformer_speed_decorator[False-True] | 20.8089ms | 20.4220ms | 48.9667 Ops/s | 48.4513 Ops/s | |
| test_vmap_transformer_speed_decorator[False-False] | 20.8494ms | 20.4554ms | 48.8869 Ops/s | 48.4418 Ops/s | |
| test_to_module_speed[True] | 1.9032ms | 1.4762ms | 677.4101 Ops/s | 670.4729 Ops/s | |
| test_to_module_speed[False] | 1.8749ms | 1.4509ms | 689.2072 Ops/s | 683.9365 Ops/s | |
| test_tc_init | 68.0340μs | 45.5383μs | 21.9596 KOps/s | 21.5877 KOps/s | |
| test_tc_init_tensor_only | 43.2030μs | 9.8358μs | 101.6696 KOps/s | 100.6625 KOps/s | |
| test_tc_init_nested | 0.5128ms | 88.9313μs | 11.2446 KOps/s | 10.7159 KOps/s | |
| test_tc_init_many_fields | 47.7420μs | 16.4788μs | 60.6839 KOps/s | 59.8178 KOps/s | |
| test_tc_first_layer_tensor | 0.4111ms | 1.8652μs | 536.1270 KOps/s | 529.9834 KOps/s | |
| test_tc_first_layer_tensor_only | 59.5801μs | 0.7424μs | 1.3470 MOps/s | 1.3157 MOps/s | |
| test_tc_first_layer_tensor_set | 31.9020μs | 3.9320μs | 254.3265 KOps/s | 251.7524 KOps/s | |
| test_tc_first_layer_tensor_only_set | 27.8810μs | 3.1125μs | 321.2878 KOps/s | 313.3461 KOps/s | |
| test_tc_first_layer_nontensor | 30.7810μs | 6.1372μs | 162.9415 KOps/s | 159.1004 KOps/s | |
| test_tc_second_layer_tensor | 0.4218ms | 4.3944μs | 227.5623 KOps/s | 224.0367 KOps/s | |
| test_tc_second_layer_nontensor | 51.1620μs | 8.7178μs | 114.7079 KOps/s | 112.6289 KOps/s | |
| test_unbind | 0.2462s | 13.9523ms | 71.6729 Ops/s | 56.5146 Ops/s | |
| test_full_like | 4.5256ms | 4.3773ms | 228.4503 Ops/s | 227.8864 Ops/s | |
| test_zeros_like | 4.9762ms | 4.3849ms | 228.0536 Ops/s | 228.8399 Ops/s | |
| test_ones_like | 0.2317s | 5.2831ms | 189.2813 Ops/s | 228.4820 Ops/s | |
| test_clone | 6.5949ms | 6.4551ms | 154.9155 Ops/s | 154.5710 Ops/s | |
| test_squeeze | 0.1874ms | 14.3287μs | 69.7902 KOps/s | 69.5670 KOps/s | |
| test_unsqueeze | 0.5384ms | 0.1103ms | 9.0646 KOps/s | 9.0614 KOps/s | |
| test_split | 0.2572ms | 0.1880ms | 5.3197 KOps/s | 5.2947 KOps/s | |
| test_permute | 0.6334ms | 0.2091ms | 4.7820 KOps/s | 4.7038 KOps/s | |
| test_stack | 51.5232ms | 51.1842ms | 19.5373 Ops/s | 23.2298 Ops/s | |
| test_cat | 51.6098ms | 51.1809ms | 19.5385 Ops/s | 23.2662 Ops/s |
Contributor
|
| Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
|---|---|---|---|---|---|
| test_plain_set_nested | 37.4010μs | 14.9236μs | 67.0078 KOps/s | 67.6600 KOps/s | |
| test_plain_set_stack_nested | 41.7110μs | 15.2228μs | 65.6911 KOps/s | 66.7352 KOps/s | |
| test_plain_set_nested_inplace | 44.4310μs | 16.6830μs | 59.9412 KOps/s | 60.9602 KOps/s | |
| test_plain_set_stack_nested_inplace | 40.4600μs | 16.5807μs | 60.3109 KOps/s | 60.6668 KOps/s | |
| test_items | 44.5900μs | 5.9489μs | 168.0974 KOps/s | 169.6060 KOps/s | |
| test_items_nested | 0.4917ms | 0.4634ms | 2.1580 KOps/s | 2.1597 KOps/s | |
| test_items_nested_locked | 0.5157ms | 0.4683ms | 2.1354 KOps/s | 2.1588 KOps/s | |
| test_items_nested_leaf | 0.1902ms | 96.4166μs | 10.3717 KOps/s | 10.3638 KOps/s | |
| test_items_stack_nested | 0.5059ms | 0.4716ms | 2.1202 KOps/s | 2.1558 KOps/s | |
| test_items_stack_nested_leaf | 0.1360ms | 96.2230μs | 10.3925 KOps/s | 10.4425 KOps/s | |
| test_items_stack_nested_locked | 0.5188ms | 0.4760ms | 2.1008 KOps/s | 2.1440 KOps/s | |
| test_keys | 23.7510μs | 4.2410μs | 235.7941 KOps/s | 236.9206 KOps/s | |
| test_keys_nested | 0.1614ms | 0.1225ms | 8.1620 KOps/s | 8.2816 KOps/s | |
| test_keys_nested_locked | 0.6668ms | 0.1309ms | 7.6386 KOps/s | 7.7447 KOps/s | |
| test_keys_nested_leaf | 0.1569ms | 0.1129ms | 8.8600 KOps/s | 8.9715 KOps/s | |
| test_keys_stack_nested | 0.1673ms | 0.1221ms | 8.1879 KOps/s | 8.2626 KOps/s | |
| test_keys_stack_nested_leaf | 0.1710ms | 0.1121ms | 8.9212 KOps/s | 9.0982 KOps/s | |
| test_keys_stack_nested_locked | 0.1631ms | 0.1306ms | 7.6560 KOps/s | 7.7465 KOps/s | |
| test_values | 7.8140μs | 1.0299μs | 970.9730 KOps/s | 974.4976 KOps/s | |
| test_values_nested | 77.4610μs | 48.8424μs | 20.4740 KOps/s | 20.7331 KOps/s | |
| test_values_nested_locked | 90.6410μs | 51.8318μs | 19.2932 KOps/s | 19.5008 KOps/s | |
| test_values_nested_leaf | 83.6110μs | 55.6741μs | 17.9617 KOps/s | 18.1602 KOps/s | |
| test_values_stack_nested | 74.5810μs | 48.4576μs | 20.6366 KOps/s | 20.8743 KOps/s | |
| test_values_stack_nested_leaf | 83.9710μs | 55.7020μs | 17.9527 KOps/s | 18.3209 KOps/s | |
| test_values_stack_nested_locked | 95.4510μs | 52.4659μs | 19.0600 KOps/s | 19.4691 KOps/s | |
| test_membership | 5.4883μs | 0.8428μs | 1.1866 MOps/s | 1.1568 MOps/s | |
| test_membership_nested | 31.0600μs | 2.9245μs | 341.9356 KOps/s | 334.8670 KOps/s | |
| test_membership_nested_leaf | 16.3405μs | 2.8822μs | 346.9594 KOps/s | 334.3726 KOps/s | |
| test_membership_stacked_nested | 37.2000μs | 2.9860μs | 334.8927 KOps/s | 337.5894 KOps/s | |
| test_membership_stacked_nested_leaf | 28.6800μs | 2.9494μs | 339.0498 KOps/s | 338.4541 KOps/s | |
| test_membership_nested_last | 44.4600μs | 4.4712μs | 223.6524 KOps/s | 226.7568 KOps/s | |
| test_membership_nested_leaf_last | 37.0410μs | 4.4550μs | 224.4683 KOps/s | 226.9006 KOps/s | |
| test_membership_stacked_nested_last | 42.5810μs | 4.4238μs | 226.0514 KOps/s | 226.2398 KOps/s | |
| test_membership_stacked_nested_leaf_last | 32.4300μs | 4.4336μs | 225.5494 KOps/s | 224.6660 KOps/s | |
| test_nested_getleaf | 58.3910μs | 21.6795μs | 46.1264 KOps/s | 45.6362 KOps/s | |
| test_nested_get | 45.2700μs | 20.2695μs | 49.3351 KOps/s | 48.6638 KOps/s | |
| test_stacked_getleaf | 47.7010μs | 21.6229μs | 46.2473 KOps/s | 45.8861 KOps/s | |
| test_stacked_get | 47.3600μs | 20.5214μs | 48.7296 KOps/s | 47.8645 KOps/s | |
| test_nested_getitemleaf | 50.5700μs | 22.2353μs | 44.9735 KOps/s | 45.1119 KOps/s | |
| test_nested_getitem | 45.8110μs | 21.1012μs | 47.3907 KOps/s | 47.5949 KOps/s | |
| test_stacked_getitemleaf | 49.8710μs | 22.0347μs | 45.3829 KOps/s | 44.1102 KOps/s | |
| test_stacked_getitem | 67.7010μs | 21.1258μs | 47.3355 KOps/s | 46.3139 KOps/s | |
| test_lock_nested | 7.8771ms | 0.4835ms | 2.0682 KOps/s | 2.0771 KOps/s | |
| test_lock_stack_nested | 0.5176ms | 0.4835ms | 2.0683 KOps/s | 2.0562 KOps/s | |
| test_unlock_nested | 0.5960ms | 0.3859ms | 2.5916 KOps/s | 2.5901 KOps/s | |
| test_unlock_stack_nested | 0.4248ms | 0.3878ms | 2.5785 KOps/s | 2.5626 KOps/s | |
| test_flatten_speed | 0.1735ms | 0.1240ms | 8.0676 KOps/s | 8.1198 KOps/s | |
| test_unflatten_speed | 0.6452ms | 0.5774ms | 1.7319 KOps/s | 1.7260 KOps/s | |
| test_common_ops | 0.9003ms | 0.6899ms | 1.4494 KOps/s | 1.4562 KOps/s | |
| test_creation | 0.1264ms | 2.9508μs | 338.8950 KOps/s | 344.4195 KOps/s | |
| test_creation_empty | 25.3200μs | 6.2866μs | 159.0674 KOps/s | 161.9094 KOps/s | |
| test_creation_nested_1 | 39.1800μs | 10.7059μs | 93.4068 KOps/s | 94.5379 KOps/s | |
| test_creation_nested_2 | 35.5100μs | 12.0321μs | 83.1113 KOps/s | 83.4307 KOps/s | |
| test_creation_many_keys[10] | 45.6610μs | 18.4897μs | 54.0843 KOps/s | 54.6406 KOps/s | |
| test_creation_many_keys[50] | 0.1163ms | 78.7083μs | 12.7051 KOps/s | 12.7385 KOps/s | |
| test_creation_many_keys[100] | 0.2040ms | 0.1530ms | 6.5347 KOps/s | 6.5626 KOps/s | |
| test_creation_nested_many_keys[10] | 66.5010μs | 39.8052μs | 25.1223 KOps/s | 25.5435 KOps/s | |
| test_creation_nested_many_keys[50] | 0.1942ms | 0.1618ms | 6.1810 KOps/s | 6.2625 KOps/s | |
| test_clone | 56.6510μs | 13.6747μs | 73.1278 KOps/s | 73.2524 KOps/s | |
| test_getitem[int] | 1.6933ms | 14.8633μs | 67.2799 KOps/s | 55.8482 KOps/s | |
| test_getitem[slice_int] | 0.1480ms | 25.2889μs | 39.5430 KOps/s | 39.4509 KOps/s | |
| test_getitem[range] | 0.1869ms | 62.8642μs | 15.9073 KOps/s | 15.8376 KOps/s | |
| test_getitem[tuple] | 0.1497ms | 24.2286μs | 41.2735 KOps/s | 40.8776 KOps/s | |
| test_getitem[list] | 0.1797ms | 58.4431μs | 17.1107 KOps/s | 17.1623 KOps/s | |
| test_setitem_dim[int] | 48.4410μs | 26.9821μs | 37.0616 KOps/s | 37.7988 KOps/s | |
| test_setitem_dim[slice_int] | 72.3710μs | 46.5568μs | 21.4791 KOps/s | 22.4098 KOps/s | |
| test_setitem_dim[range] | 0.1275ms | 98.9524μs | 10.1059 KOps/s | 10.5079 KOps/s | |
| test_setitem_dim[tuple] | 64.0010μs | 42.1845μs | 23.7054 KOps/s | 24.0523 KOps/s | |
| test_setitem | 72.5610μs | 18.0834μs | 55.2994 KOps/s | 54.7045 KOps/s | |
| test_set | 58.6810μs | 17.3297μs | 57.7043 KOps/s | 57.2646 KOps/s | |
| test_set_shared | 0.4927ms | 0.2060ms | 4.8549 KOps/s | 4.8095 KOps/s | |
| test_update | 0.3459ms | 21.8866μs | 45.6901 KOps/s | 45.6254 KOps/s | |
| test_update_nested | 81.5820μs | 34.3413μs | 29.1195 KOps/s | 29.4221 KOps/s | |
| test_update__nested | 0.5710ms | 35.4891μs | 28.1777 KOps/s | 28.5294 KOps/s | |
| test_set_nested | 62.8110μs | 19.5163μs | 51.2393 KOps/s | 51.3836 KOps/s | |
| test_set_nested_new | 68.4010μs | 25.0415μs | 39.9337 KOps/s | 40.5384 KOps/s | |
| test_select | 86.3820μs | 42.6588μs | 23.4418 KOps/s | 23.7266 KOps/s | |
| test_select_nested | 0.1180ms | 75.6000μs | 13.2275 KOps/s | 13.3194 KOps/s | |
| test_exclude_nested | 0.1220ms | 93.2083μs | 10.7287 KOps/s | 10.6998 KOps/s | |
| test_empty[True] | 0.4392ms | 0.4003ms | 2.4983 KOps/s | 2.5273 KOps/s | |
| test_empty[False] | 10.2903μs | 1.3369μs | 748.0075 KOps/s | 748.1567 KOps/s | |
| test_to | 0.1022ms | 71.6910μs | 13.9488 KOps/s | 13.4262 KOps/s | |
| test_to_nonblocking | 0.1261ms | 65.8270μs | 15.1913 KOps/s | 15.3842 KOps/s | |
| test_unbind_speed | 0.4013ms | 0.3264ms | 3.0638 KOps/s | 3.0606 KOps/s | |
| test_unbind_speed_stack0 | 0.4246ms | 0.3293ms | 3.0371 KOps/s | 3.0509 KOps/s | |
| test_unbind_speed_stack1 | 0.1034s | 0.8363ms | 1.1958 KOps/s | 1.1786 KOps/s | |
| test_split | 0.1040s | 1.2743ms | 784.7224 Ops/s | 778.7911 Ops/s | |
| test_chunk | 0.1036s | 1.2201ms | 819.6319 Ops/s | 907.8794 Ops/s | |
| test_to_cpu_blocking | 19.4078ms | 19.0189ms | 52.5793 Ops/s | 47.6877 Ops/s | |
| test_to_cpu_global_sync | 11.4909ms | 11.3560ms | 88.0594 Ops/s | 88.6464 Ops/s | |
| test_to_cpu_event_sync | 12.4313ms | 12.1751ms | 82.1347 Ops/s | 82.0043 Ops/s | |
| test_to_cpu_default | 0.1155s | 13.5092ms | 74.0235 Ops/s | 82.0112 Ops/s | |
| test_consolidate[False-None] | 4.1823ms | 4.1438ms | 241.3246 Ops/s | 218.2818 Ops/s | |
| test_consolidate[default-None] | 2.1631ms | 2.0098ms | 497.5582 Ops/s | 469.3308 Ops/s | |
| test_consolidate[reduce-overhead-None] | 2.0189ms | 1.9368ms | 516.3261 Ops/s | 491.6187 Ops/s | |
| test_consolidate_njt[False-None] | 9.0077ms | 8.5551ms | 116.8895 Ops/s | 115.9666 Ops/s | |
| test_to[False-False-None] | 2.2012ms | 2.1013ms | 475.9050 Ops/s | 473.8664 Ops/s | |
| test_to[True-False-None] | 2.2748ms | 1.9784ms | 505.4632 Ops/s | 515.8361 Ops/s | |
| test_to[within-False-None] | 6.3139ms | 6.1970ms | 161.3689 Ops/s | 161.3217 Ops/s | |
| test_to[True-default-None] | 7.7887ms | 7.6654ms | 130.4567 Ops/s | 126.7440 Ops/s | |
| test_to_njt[False-False-None] | 8.9447ms | 8.7291ms | 114.5588 Ops/s | 115.2230 Ops/s | |
| test_to_njt[True-False-None] | 7.5003ms | 7.3292ms | 136.4399 Ops/s | 141.2984 Ops/s | |
| test_to_njt[within-False-None] | 16.3691ms | 16.1488ms | 61.9242 Ops/s | 63.5357 Ops/s | |
| test_creation[device0] | 0.4335ms | 0.1219ms | 8.2022 KOps/s | 8.2704 KOps/s | |
| test_creation_from_tensor | 0.4650ms | 0.1187ms | 8.4255 KOps/s | 8.3712 KOps/s | |
| test_add_one[memmap_tensor0] | 0.2039ms | 6.6821μs | 149.6532 KOps/s | 149.1247 KOps/s | |
| test_contiguous[memmap_tensor0] | 26.0800μs | 0.6710μs | 1.4903 MOps/s | 2.1405 MOps/s | |
| test_stack[memmap_tensor0] | 36.6810μs | 4.5757μs | 218.5441 KOps/s | 210.6841 KOps/s | |
| test_memmaptd_index | 1.0786ms | 0.2652ms | 3.7705 KOps/s | 3.7896 KOps/s | |
| test_memmaptd_index_astensor | 0.5199ms | 0.3594ms | 2.7821 KOps/s | 2.8007 KOps/s | |
| test_memmaptd_index_op | 0.8372ms | 0.6065ms | 1.6487 KOps/s | 1.6402 KOps/s | |
| test_serialize_model | 0.1390s | 0.1372s | 7.2903 Ops/s | 7.2960 Ops/s | |
| test_serialize_model_pickle | 1.3501s | 1.2182s | 0.8209 Ops/s | 0.8235 Ops/s | |
| test_serialize_weights | 0.1398s | 0.1352s | 7.3960 Ops/s | 7.4017 Ops/s | |
| test_serialize_weights_returnearly | 0.4417s | 94.3258ms | 10.6016 Ops/s | 14.7377 Ops/s | |
| test_serialize_weights_pickle | 1.3805s | 1.2153s | 0.8228 Ops/s | 0.8231 Ops/s | |
| test_reshape_pytree | 0.2189ms | 33.0461μs | 30.2607 KOps/s | 29.5207 KOps/s | |
| test_reshape_td | 71.8410μs | 43.8863μs | 22.7861 KOps/s | 21.7983 KOps/s | |
| test_view_pytree | 0.2195ms | 32.7284μs | 30.5545 KOps/s | 29.5348 KOps/s | |
| test_view_td | 92.7410μs | 53.8025μs | 18.5865 KOps/s | 18.7909 KOps/s | |
| test_unbind_pytree | 0.2294ms | 37.0795μs | 26.9691 KOps/s | 26.5410 KOps/s | |
| test_unbind_td | 0.1567ms | 49.7466μs | 20.1019 KOps/s | 20.2339 KOps/s | |
| test_split_pytree | 0.2481ms | 43.0178μs | 23.2462 KOps/s | 22.7610 KOps/s | |
| test_split_td | 0.1972ms | 65.2008μs | 15.3372 KOps/s | 14.9009 KOps/s | |
| test_add_pytree | 0.2349ms | 42.8506μs | 23.3369 KOps/s | 23.2272 KOps/s | |
| test_add_td | 99.4510μs | 53.8946μs | 18.5547 KOps/s | 18.7814 KOps/s | |
| test_compile_add_one_nested[tensordict-compile] | 0.2368ms | 0.1465ms | 6.8246 KOps/s | 6.5105 KOps/s | |
| test_compile_add_one_nested[tensordict-eager] | 0.2807ms | 0.1955ms | 5.1157 KOps/s | 5.2041 KOps/s | |
| test_compile_add_one_nested[pytree-compile] | 0.1701ms | 0.1138ms | 8.7856 KOps/s | 9.0048 KOps/s | |
| test_compile_add_one_nested[pytree-eager] | 0.4538ms | 0.1817ms | 5.5045 KOps/s | 5.5825 KOps/s | |
| test_compile_copy_nested[tensordict-compile] | 0.3443ms | 33.4360μs | 29.9079 KOps/s | 27.0406 KOps/s | |
| test_compile_copy_nested[tensordict-eager] | 92.8310μs | 53.2320μs | 18.7857 KOps/s | 19.0583 KOps/s | |
| test_compile_copy_nested[pytree-compile] | 91.0820μs | 9.7629μs | 102.4289 KOps/s | 98.5072 KOps/s | |
| test_compile_copy_nested[pytree-eager] | 0.4670ms | 68.6318μs | 14.5705 KOps/s | 14.2092 KOps/s | |
| test_compile_add_one_flat[tensordict-compile] | 0.2445ms | 0.1778ms | 5.6232 KOps/s | 5.2567 KOps/s | |
| test_compile_add_one_flat[tensordict-eager] | 0.3184ms | 0.2572ms | 3.8882 KOps/s | 3.8815 KOps/s | |
| test_compile_add_one_flat[tensorclass-compile] | 0.2338ms | 0.1234ms | 8.1050 KOps/s | 8.0784 KOps/s | |
| test_compile_add_one_flat[tensorclass-eager] | 0.1103ms | 70.6933μs | 14.1456 KOps/s | 13.5435 KOps/s | |
| test_compile_add_one_flat[pytree-compile] | 0.2306ms | 0.1608ms | 6.2196 KOps/s | 6.1174 KOps/s | |
| test_compile_add_one_flat[pytree-eager] | 0.8386ms | 0.5393ms | 1.8544 KOps/s | 1.8969 KOps/s | |
| test_compile_add_self_flat[tensordict-eager] | 0.3450ms | 0.3112ms | 3.2133 KOps/s | 3.1789 KOps/s | |
| test_compile_add_self_flat[tensordict-compile] | 0.2230ms | 0.1810ms | 5.5260 KOps/s | 5.2355 KOps/s | |
| test_compile_add_self_flat[tensorclass-eager] | 0.1383ms | 86.6020μs | 11.5471 KOps/s | 11.4560 KOps/s | |
| test_compile_add_self_flat[tensorclass-compile] | 0.2051ms | 0.1205ms | 8.2996 KOps/s | 7.8610 KOps/s | |
| test_compile_add_self_flat[pytree-eager] | 0.7004ms | 0.4479ms | 2.2325 KOps/s | 2.2737 KOps/s | |
| test_compile_add_self_flat[pytree-compile] | 0.2201ms | 0.1624ms | 6.1559 KOps/s | 6.0294 KOps/s | |
| test_compile_copy_flat[tensordict-compile] | 0.1036ms | 26.4462μs | 37.8127 KOps/s | 37.5483 KOps/s | |
| test_compile_copy_flat[tensordict-eager] | 80.0510μs | 41.7774μs | 23.9364 KOps/s | 24.0840 KOps/s | |
| test_compile_copy_flat[pytree-compile] | 0.1009ms | 11.2646μs | 88.7739 KOps/s | 90.1873 KOps/s | |
| test_compile_copy_flat[pytree-eager] | 0.4253ms | 52.2539μs | 19.1373 KOps/s | 19.0409 KOps/s | |
| test_compile_assign_and_add[tensordict-compile] | 1.9855ms | 0.1731ms | 5.7756 KOps/s | 5.3620 KOps/s | |
| test_compile_assign_and_add[tensordict-eager] | 3.4115ms | 3.3220ms | 301.0227 Ops/s | 286.0363 Ops/s | |
| test_compile_assign_and_add[pytree-compile] | 1.9765ms | 0.1607ms | 6.2216 KOps/s | 6.0922 KOps/s | |
| test_compile_assign_and_add[pytree-eager] | 2.9589ms | 2.8304ms | 353.3021 Ops/s | 361.2773 Ops/s | |
| test_compile_indexing[tensor-tensordict-compile] | 0.2382ms | 0.1094ms | 9.1390 KOps/s | 8.7330 KOps/s | |
| test_compile_indexing[tensor-tensordict-eager] | 0.3118ms | 74.9410μs | 13.3438 KOps/s | 13.8295 KOps/s | |
| test_compile_indexing[tensor-tensorclass-compile] | 0.1399ms | 98.3466μs | 10.1681 KOps/s | 10.0817 KOps/s | |
| test_compile_indexing[tensor-tensorclass-eager] | 0.2596ms | 45.3269μs | 22.0620 KOps/s | 21.1596 KOps/s | |
| test_compile_indexing[tensor-pytree-compile] | 0.1479ms | 98.8907μs | 10.1122 KOps/s | 10.0150 KOps/s | |
| test_compile_indexing[tensor-pytree-eager] | 0.2970ms | 45.2678μs | 22.0907 KOps/s | 22.2448 KOps/s | |
| test_compile_indexing[slice-tensordict-compile] | 0.1750ms | 55.4480μs | 18.0349 KOps/s | 16.7571 KOps/s | |
| test_compile_indexing[slice-tensordict-eager] | 0.2307ms | 28.9044μs | 34.5969 KOps/s | 35.6539 KOps/s | |
| test_compile_indexing[slice-tensorclass-compile] | 0.1507ms | 45.7952μs | 21.8364 KOps/s | 21.4371 KOps/s | |
| test_compile_indexing[slice-tensorclass-eager] | 0.2621ms | 22.8059μs | 43.8483 KOps/s | 43.6353 KOps/s | |
| test_compile_indexing[slice-pytree-compile] | 82.4210μs | 45.5581μs | 21.9500 KOps/s | 20.9009 KOps/s | |
| test_compile_indexing[slice-pytree-eager] | 0.2663ms | 22.6770μs | 44.0975 KOps/s | 43.9903 KOps/s | |
| test_compile_indexing[int-tensordict-compile] | 0.1053ms | 56.4045μs | 17.7291 KOps/s | 16.5155 KOps/s | |
| test_compile_indexing[int-tensordict-eager] | 0.2394ms | 28.6976μs | 34.8461 KOps/s | 35.6325 KOps/s | |
| test_compile_indexing[int-tensorclass-compile] | 85.9110μs | 46.3110μs | 21.5932 KOps/s | 20.7419 KOps/s | |
| test_compile_indexing[int-tensorclass-eager] | 0.2793ms | 22.5719μs | 44.3029 KOps/s | 43.6378 KOps/s | |
| test_compile_indexing[int-pytree-compile] | 83.8010μs | 45.7895μs | 21.8391 KOps/s | 21.0995 KOps/s | |
| test_compile_indexing[int-pytree-eager] | 0.2720ms | 22.4742μs | 44.4954 KOps/s | 43.4459 KOps/s | |
| test_mod_add[eager] | 98.4820μs | 52.4446μs | 19.0677 KOps/s | 19.7221 KOps/s | |
| test_mod_add[compile] | 0.1749ms | 0.1051ms | 9.5156 KOps/s | 9.3564 KOps/s | |
| test_mod_add[compile-overhead] | 0.2330ms | 0.1493ms | 6.6972 KOps/s | 6.4865 KOps/s | |
| test_mod_wrap[eager] | 0.4625ms | 0.3044ms | 3.2848 KOps/s | 3.4187 KOps/s | |
| test_mod_wrap[compile] | 0.4108ms | 0.3494ms | 2.8620 KOps/s | 2.7167 KOps/s | |
| test_mod_wrap[compile-overhead] | 7.2936ms | 4.0280ms | 248.2616 Ops/s | 250.3362 Ops/s | |
| test_mod_wrap_and_backward[eager] | 1.6211ms | 1.5229ms | 656.6387 Ops/s | 664.3015 Ops/s | |
| test_mod_wrap_and_backward[compile] | 1.6497ms | 1.4626ms | 683.7072 Ops/s | 675.2975 Ops/s | |
| test_mod_wrap_and_backward[compile-overhead] | 1.2345ms | 0.8886ms | 1.1253 KOps/s | 1.1041 KOps/s | |
| test_seq_add[eager] | 0.2089ms | 0.1581ms | 6.3263 KOps/s | 6.1845 KOps/s | |
| test_seq_add[compile] | 0.4279ms | 0.1149ms | 8.6998 KOps/s | 8.3258 KOps/s | |
| test_seq_add[compile-overhead] | 0.1877ms | 0.1550ms | 6.4516 KOps/s | 6.0746 KOps/s | |
| test_seq_wrap[eager] | 0.7485ms | 0.5289ms | 1.8907 KOps/s | 1.8737 KOps/s | |
| test_seq_wrap[compile] | 0.4812ms | 0.3688ms | 2.7112 KOps/s | 2.6253 KOps/s | |
| test_seq_wrap[compile-overhead] | 0.3298ms | 0.2675ms | 3.7384 KOps/s | 3.6831 KOps/s | |
| test_func_call_runtime[False-eager] | 0.9180ms | 0.8538ms | 1.1712 KOps/s | 1.1846 KOps/s | |
| test_func_call_runtime[False-compile] | 0.9742ms | 0.9140ms | 1.0941 KOps/s | 1.0880 KOps/s | |
| test_func_call_runtime[False-compile-overhead] | 0.5344ms | 0.4614ms | 2.1675 KOps/s | 2.1128 KOps/s | |
| test_func_call_runtime[True-eager] | 1.1737ms | 1.0913ms | 916.3759 Ops/s | 905.7753 Ops/s | |
| test_func_call_runtime[True-compile] | 1.0050ms | 0.9270ms | 1.0787 KOps/s | 1.0708 KOps/s | |
| test_func_call_runtime[True-compile-overhead] | 0.5236ms | 0.4730ms | 2.1142 KOps/s | 2.0629 KOps/s | |
| test_func_call_cm_runtime[False-eager] | 0.9502ms | 0.8494ms | 1.1773 KOps/s | 1.1258 KOps/s | |
| test_func_call_cm_runtime[False-compile] | 0.9638ms | 0.9168ms | 1.0908 KOps/s | 1.0788 KOps/s | |
| test_func_call_cm_runtime[False-compile-overhead] | 0.5499ms | 0.4638ms | 2.1561 KOps/s | 2.1188 KOps/s | |
| test_func_call_cm_runtime[True-eager] | 1.3271ms | 1.2351ms | 809.6588 Ops/s | 810.5376 Ops/s | |
| test_func_call_cm_runtime[True-compile] | 1.0546ms | 0.9575ms | 1.0444 KOps/s | 1.0288 KOps/s | |
| test_func_call_cm_runtime[True-compile-overhead] | 0.5473ms | 0.5066ms | 1.9739 KOps/s | 1.9293 KOps/s | |
| test_vmap_func_call_cm_runtime[eager] | 3.0583ms | 2.4048ms | 415.8408 Ops/s | 418.3579 Ops/s | |
| test_vmap_func_call_cm_runtime[compile] | 1.0545ms | 0.9775ms | 1.0230 KOps/s | 989.7993 Ops/s | |
| test_vmap_func_call_cm_runtime[compile-overhead] | 0.5554ms | 0.5107ms | 1.9579 KOps/s | 1.9059 KOps/s | |
| test_distributed | 3.0866ms | 0.1668ms | 5.9950 KOps/s | 6.5155 KOps/s | |
| test_tdmodule | 49.0700μs | 27.6198μs | 36.2059 KOps/s | 35.5350 KOps/s | |
| test_tdmodule_dispatch | 84.4120μs | 45.0724μs | 22.1865 KOps/s | 21.7610 KOps/s | |
| test_tdseq | 62.2500μs | 27.1410μs | 36.8446 KOps/s | 36.3218 KOps/s | |
| test_tdseq_dispatch | 0.1124ms | 47.6172μs | 21.0008 KOps/s | 20.6642 KOps/s | |
| test_instantiation_functorch | 2.1588ms | 2.0924ms | 477.9157 Ops/s | 473.9314 Ops/s | |
| test_exec_functorch | 0.2580ms | 0.1820ms | 5.4931 KOps/s | 5.4606 KOps/s | |
| test_exec_functional_call | 0.2800ms | 0.1669ms | 5.9912 KOps/s | 6.0785 KOps/s | |
| test_exec_td_decorator | 0.4460ms | 0.2409ms | 4.1505 KOps/s | 4.1436 KOps/s | |
| test_vmap_mlp_speed_decorator[True-True] | 1.0240ms | 0.8269ms | 1.2093 KOps/s | 1.2135 KOps/s | |
| test_vmap_mlp_speed_decorator[True-False] | 1.0026ms | 0.8322ms | 1.2016 KOps/s | 1.2149 KOps/s | |
| test_vmap_mlp_speed_decorator[False-True] | 0.9063ms | 0.7179ms | 1.3930 KOps/s | 1.3992 KOps/s | |
| test_vmap_mlp_speed_decorator[False-False] | 0.9045ms | 0.7184ms | 1.3920 KOps/s | 1.4023 KOps/s | |
| test_vmap_transformer_speed_decorator[True-True] | 20.8815ms | 20.7798ms | 48.1237 Ops/s | 48.5147 Ops/s | |
| test_vmap_transformer_speed_decorator[True-False] | 21.4010ms | 20.7610ms | 48.1672 Ops/s | 48.4487 Ops/s | |
| test_vmap_transformer_speed_decorator[False-True] | 21.4277ms | 20.6332ms | 48.4655 Ops/s | 48.8663 Ops/s | |
| test_vmap_transformer_speed_decorator[False-False] | 21.2337ms | 20.6044ms | 48.5333 Ops/s | 48.8760 Ops/s | |
| test_to_module_speed[True] | 2.0831ms | 1.4904ms | 670.9595 Ops/s | 666.9121 Ops/s | |
| test_to_module_speed[False] | 1.9729ms | 1.4591ms | 685.3554 Ops/s | 684.0499 Ops/s | |
| test_tc_init | 78.6810μs | 45.6039μs | 21.9280 KOps/s | 21.3211 KOps/s | |
| test_tc_init_tensor_only | 36.6410μs | 9.8687μs | 101.3304 KOps/s | 100.8824 KOps/s | |
| test_tc_init_nested | 0.1263ms | 90.3357μs | 11.0698 KOps/s | 10.8221 KOps/s | |
| test_tc_init_many_fields | 41.5400μs | 16.5854μs | 60.2938 KOps/s | 60.1175 KOps/s | |
| test_tc_first_layer_tensor | 41.1400μs | 1.8594μs | 537.8148 KOps/s | 530.4585 KOps/s | |
| test_tc_first_layer_tensor_only | 4.9586μs | 0.7506μs | 1.3323 MOps/s | 1.3198 MOps/s | |
| test_tc_first_layer_tensor_set | 35.2310μs | 3.9964μs | 250.2254 KOps/s | 254.8057 KOps/s | |
| test_tc_first_layer_tensor_only_set | 26.3100μs | 3.1887μs | 313.6043 KOps/s | 314.2390 KOps/s | |
| test_tc_first_layer_nontensor | 32.8810μs | 6.2964μs | 158.8216 KOps/s | 160.7595 KOps/s | |
| test_tc_second_layer_tensor | 31.1910μs | 4.4666μs | 223.8839 KOps/s | 224.9813 KOps/s | |
| test_tc_second_layer_nontensor | 68.9910μs | 8.8685μs | 112.7592 KOps/s | 112.5530 KOps/s | |
| test_unbind | 0.2580s | 16.2858ms | 61.4031 Ops/s | 56.7064 Ops/s | |
| test_full_like | 4.5860ms | 4.4188ms | 226.3065 Ops/s | 135.6551 Ops/s | |
| test_zeros_like | 4.5567ms | 4.3951ms | 227.5268 Ops/s | 232.2748 Ops/s | |
| test_ones_like | 4.4951ms | 4.3940ms | 227.5831 Ops/s | 231.1053 Ops/s | |
| test_clone | 6.9081ms | 6.6483ms | 150.4147 Ops/s | 148.5321 Ops/s | |
| test_squeeze | 0.2016ms | 14.2345μs | 70.2520 KOps/s | 69.0973 KOps/s | |
| test_unsqueeze | 0.1735ms | 0.1141ms | 8.7650 KOps/s | 8.8365 KOps/s | |
| test_split | 0.3632ms | 0.1842ms | 5.4287 KOps/s | 5.3098 KOps/s | |
| test_permute | 0.2493ms | 0.2157ms | 4.6366 KOps/s | 4.8942 KOps/s | |
| test_stack | 52.3646ms | 51.9599ms | 19.2456 Ops/s | 19.1695 Ops/s | |
| test_cat | 52.4328ms | 51.9931ms | 19.2333 Ops/s | 19.1973 Ops/s |
…B backend support Rename classes to be backend-agnostic: - RedisTensorDict -> TensorDictStore - RedisLazyStackedTensorDict -> LazyStackedTensorDictStore - redis.py -> store.py (with redis.py as backward-compat shim) Add `backend` parameter to constructors, from_tensordict(), from_store(), from_lazy_stack(), and the new to_store() method on TensorDictBase. The backend parameter accepts "redis", "dragonfly", "keydb", or any string (all use the same redis-py wire protocol). Full backward compatibility preserved: - `from tensordict.redis import RedisTensorDict` still works - `td.to_redis()` still works (alias of to_store(backend="redis")) - `TensorDictStore.from_redis()` still works (alias of from_store()) - Old class names available as aliases in both modules Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
3dbe35c to
9248b3b
Compare
Store the fully-qualified TensorClass class path (e.g. "mymodule.MyData") as a Redis key when uploading via from_tensordict(). On from_store(), auto-import the class and return a TensorClass wrapping the store for transparent Redis-backed attribute access. - Add _tensorclass_key property and _tensorclass_cls attribute - Detect TensorClass in from_tensordict and persist class path - Add tensorclass_cls parameter to from_store for explicit or auto-import reconstruction - Add _resolve_tensorclass helper for safe import from dotted path - Update __getstate__/__setstate__ for pickling support - Add 9 tests covering round-trip, auto-import, explicit cls, attribute access, non-tensor fields, and pickling Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
Closing in favour of ghstack submission |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
RedisTensorDict→TensorDictStoreandRedisLazyStackedTensorDict→LazyStackedTensorDictStoreto be backend-agnosticredis.py→store.py(withredis.pykept as a backward-compat re-export shim)backendkeyword argument ("redis","dragonfly","keydb", or any string) to all constructors, factory methods, andTensorDictBase.to_store()to_store()onTensorDictBase(withto_redis()as alias) andfrom_store()on both classes (withfrom_redis()as alias)Since Dragonfly and KeyDB are 100% Redis wire-protocol compatible, they use the same
redis-pyclient — thebackendparameter is stored for documentation/repr purposes and passed through pickling.Test plan
tensordict.redisverifiedtd.to_redis()alias verifiedbackend="dragonfly"construction, repr, and pickle roundtrip verifiedMade with Cursor