Yuval Tassa
a8a5afc8dc
Cache benchmark data in engine_util_sparse_benchmark_test
...
PiperOrigin-RevId: 902651349
Change-Id: I760e3f696b37699366c40c3c93a74e2b1b35678e
2026-04-20 08:29:56 -07:00
Yuval Tassa
e6d77650f7
Refactor mju_combineSparse to eliminate temporary buffers.
...
Combine sparse vectors in-place by first counting total `nnz` and then working backwards from the end. This removes the need for temporary buffers in `mju_combineSparse` and its callers and speeds up the function by ~10%.
PiperOrigin-RevId: 902530210
Change-Id: I4f48c327103552ab968d3915399c6067367bec9f
2026-04-20 03:10:18 -07:00
Yuval Tassa
a2d0e33c0f
2-3x speedup of sparse matrix squaring.
...
Split symbolic and numeric phases for sparse `M'*diag*M` computation. Microseconds per call for the monolithic vs the split approach for the 100_humanoids and 2humanoid100 models:
```
+-------+------+----------+------------+---------+
| Model | Arch | Col (µs) | Split (µs) | Speedup |
+-------+------+----------+------------+---------+
| 2H100 | x86 | 238.3 | 74.5 | 3.2x |
+-------+------+----------+------------+---------+
| | ARM | 111.6 | 53.2 | 2.1x |
+-------+------+----------+------------+---------+
| 100H | x86 | 1325.3 | 656.2 | 2.0x |
+-------+------+----------+------------+---------+
| | ARM | 594.8 | 306.6 | 1.9x |
+-------+------+----------+------------+---------+
```
PiperOrigin-RevId: 900154308
Change-Id: Ia6e9b8e196e2ed37b723a0faf60e9731303a9619
2026-04-15 07:19:41 -07:00
Yuval Tassa
ec94bb49aa
Make constraint island discovery on by default.
...
Also fix latent bug in mjData serialization.
PiperOrigin-RevId: 799505349
Change-Id: I299e7cc8133fa2ec0b339a7ff3d02543e06778b1
2025-08-26 04:27:24 -07:00
Yuval Tassa
2f28473bc1
Remove transposed Jacobian fields from mjData
...
No longer computed unconditionally, only ad-hoc where required.
PiperOrigin-RevId: 797753297
Change-Id: I2030fc342c98ff33575b0526dd72e2110c4fcb74
2025-08-21 07:21:24 -07:00
Alessio Quaglino
7edbdd0ad6
Remove the Shell plugin and integrate it into the engine.
...
PiperOrigin-RevId: 760688502
Change-Id: Ia70988d42b7edf571d7cb4a4f48f8fc50b51667d
2025-05-19 10:51:25 -07:00
Yuval Tassa
45fc15b844
Speed up sparse supernode detection by combining it with transposition.
...
PiperOrigin-RevId: 760673008
Change-Id: I6d66580e675fd86e5b974859383f93f87482ca16
2025-05-19 10:14:15 -07:00
Yuval Tassa
ee8abdf854
Speed up mju_sqrMatTDSparse
...
PiperOrigin-RevId: 759593417
Change-Id: I0168e1f96333769d09d61e835560910d43aac608
2025-05-16 06:42:17 -07:00
Yuval Tassa
b53ed63b5f
Use 2humanoid100.xml model in a benchmark test.
...
PiperOrigin-RevId: 757784271
Change-Id: I7da11ab85ba9f5e023cdbe3c77d31224f3444ca5
2025-05-12 08:59:14 -07:00
Yuval Tassa
e39a5df06a
mju_compressSparse(): add option to compress away small elements.
...
PiperOrigin-RevId: 726010576
Change-Id: Ib6458037a5cf9a9d82abb364b7dda7aab2f36807
2025-02-12 05:08:20 -08:00
Yuval Tassa
00010f5848
Compute diagonal indices in mj_sqrMatTDSparse
...
PiperOrigin-RevId: 713714087
Change-Id: Icc8eae74e6e47ba1d12a6e9aa0d774ab006cfe38
2025-01-09 10:17:31 -08:00
Yuval Tassa
7eb8231fda
Represent only the lower triangle in Newton solver's reduced dof-dof matrix.
...
PiperOrigin-RevId: 712488529
Change-Id: Iad91c72654376539791d7856765a0d0ac9088251
2025-01-06 04:58:55 -08:00
Yuval Tassa
a4a6248a06
Move AsVector utility to fixture.h
...
PiperOrigin-RevId: 690577546
Change-Id: I2cebcffa1f2e3b0789f43e772e364c4762719ab3
2024-10-28 05:52:25 -07:00
Yuval Tassa
4e3dc14f8e
Remove model/humanoid100/humanoid100.xml (used <include>), replace with model/humanoid/humanoid100.xml (uses <attach>)
...
PiperOrigin-RevId: 673123895
Change-Id: I0c3c6dac69d9fc12a6ea76d586c34503fc167bad
2024-09-10 15:14:04 -07:00
Alessio Quaglino
4862b9e765
Remove plugin support from Composite particles.
...
This functionality is replaced by FlexComp.
PiperOrigin-RevId: 672503965
Change-Id: I58953267de285f82e416f9f60576a336b7d0da4c
2024-09-09 04:58:26 -07:00
Alessio Quaglino
d3d46e16a4
Remove cloth and rope composites and deprecate loop.
...
PiperOrigin-RevId: 568168329
Change-Id: Ida4a5236bef74828c7bf59affdc28adea3db53b1
2023-09-25 03:38:43 -07:00
Saran Tunyasuvunakool
4929077211
Remove mjMARKSTACK and mjFREESTACK macros.
...
PiperOrigin-RevId: 562844184
Change-Id: Id2f57f5d132c47094dad75c6dab7297d7aa73458
2023-09-05 11:41:43 -07:00
Saran Tunyasuvunakool
b979a26b10
Rename mj_stackAlloc to mj_stackAllocNum.
...
PiperOrigin-RevId: 561040193
Change-Id: I49ea21ffb5b596471d2aacefb1961c11c5c905d0
2023-08-29 08:43:03 -07:00
Kyle Bayes
ba12a1354b
Optimize and refactor combineSparse and combineSparseCount.
...
PiperOrigin-RevId: 558126391
Change-Id: Iead14c31136e789560f3c8124b84bd4e383158f4
2023-08-18 06:14:09 -07:00
Kyle Bayes
2d7d5319f7
Rework sparse addM function to support compressed sparse matrices.
...
Note:
- M is still a nv x nv uncompressed sparse matrix.
- NNZ precounting still needs to be implemented using the combineSparseCount helper function.
PiperOrigin-RevId: 554452710
Change-Id: I14adf58fc3acd4ed82d864d7c2e9e96ee6b0377d
2023-08-07 06:07:24 -07:00
Kyle Bayes
2b6ea95d16
Fix dimension of res vector in sparse benchmark test.
...
PiperOrigin-RevId: 540336845
Change-Id: I79d4c487455a0642d57f36abe0e38eae92f212fa
2023-06-14 11:49:53 -07:00
Kyle Bayes
81d74c56e1
Separate mj_addM into dense and sparse functions.
...
PiperOrigin-RevId: 539066339
Change-Id: Ide3f9644fee46a5fb1a2e79a25be162b929e2421
2023-06-09 06:44:19 -07:00
Saran Tunyasuvunakool
f887c1e928
Add ASAN and MSAN instrumentation for arena and mjData stack.
...
PiperOrigin-RevId: 535635490
Change-Id: Ia1e58771bae25bf72c861f57452fb8faa2b918fb
2023-05-26 09:17:26 -07:00
Kyle Bayes
9924cce4b7
Add nnz per row precount method for mju_sqrMatTDSparse.
...
PiperOrigin-RevId: 521744893
Change-Id: Ie0fbfab552a680127f4acf9041b07916f8a2a490
2023-04-04 06:21:22 -07:00
Kyle Bayes
8696247f9d
Add mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
...
PiperOrigin-RevId: 517672195
Change-Id: Ie14e6c9c99e8b9e1c5d3686b77631f2df0651c67
2023-03-18 13:04:14 -07:00
Kyle Bayes
056e849273
Provide improved mju_sqrMatTDSparse implementation that doesn't require dense memory allocation for sparse matrices.
...
PiperOrigin-RevId: 516812783
Change-Id: Ieb43337831d8d3b2c7f18a7facd8e0a0f2b0eff5
2023-03-15 06:56:16 -07:00
Yuval Tassa
7e7cb177a4
Cosmetic changes.
...
PiperOrigin-RevId: 511008317
Change-Id: Id8d7cd4f4e22e0658857d16b47d51053f1477bb9
2023-02-20 09:23:32 -08:00
Kyle Bayes
c741dfce7d
Implement a more performant mju_transposeSparse that doesn't require dense memory allocation.
...
PiperOrigin-RevId: 505044194
Change-Id: Ibe0e39e3ad711b2b5bdad45180ca4f83b5c8fc82
2023-01-27 00:20:01 -08:00
Alessio Quaglino
2d304d65e5
Use memcmp for mju_compare if no AVX. 15% faster on Humanoid.
...
PiperOrigin-RevId: 493324356
Change-Id: I5f71dc1a8ae40c18864ea80f00a5f86ff952f72c
2022-12-06 09:14:33 -08:00
Alessio Quaglino
7b0fbc63f8
Speed improvement with no AVX. 40% on Linux Intel Xeon and 60% on ARM Mac.
...
PiperOrigin-RevId: 488360660
Change-Id: I423269cd362fdcc2434393b691638ac6ed778ef2
2022-11-14 07:31:32 -08:00