Remove cloth and rope composites and deprecate loop.
PiperOrigin-RevId: 568168329 Change-Id: Ida4a5236bef74828c7bf59affdc28adea3db53b1
This commit is contained in:
committed by
Copybara-Service
parent
cbb07a4c32
commit
d3d46e16a4
@@ -25,7 +25,7 @@ namespace mujoco {
|
||||
namespace {
|
||||
|
||||
// number of steps to roll out before benhmarking
|
||||
static const int kNumWarmupSteps = 500;
|
||||
static const int kNumWarmupSteps = 200;
|
||||
|
||||
// number of steps to benchmark
|
||||
static const int kNumBenchmarkSteps = 50;
|
||||
@@ -102,7 +102,7 @@ void solveM_baseline(const mjModel* m, mjData* d, mjtNum* x, const mjtNum* y) {
|
||||
// ----------------------------- benchmark ------------------------------------
|
||||
|
||||
static void BM_solveLD(benchmark::State& state, bool new_function) {
|
||||
static mjModel* m = LoadModelFromPath("composite/cloth.xml");
|
||||
static mjModel* m = LoadModelFromPath("plugin/elasticity/coil.xml");
|
||||
mjData* d = mj_makeData(m);
|
||||
|
||||
// warm-up rollout to get a typical state
|
||||
|
||||
@@ -348,7 +348,7 @@ void ABSL_ATTRIBUTE_NOINLINE mulMatVecSparse_8(mjtNum* res,
|
||||
// ----------------------------- benchmark ------------------------------------
|
||||
|
||||
static void BM_MatVecSparse(benchmark::State& state, int unroll) {
|
||||
static mjModel* m = LoadModelFromPath("composite/cloth.xml");
|
||||
static mjModel* m = LoadModelFromPath("plugin/elasticity/flag.xml");
|
||||
mjData* d = mj_makeData(m);
|
||||
|
||||
// warm-up rollout to get a typical state
|
||||
|
||||
@@ -48,13 +48,14 @@ static void run_parse_benchmark(const std::string xml_path, benchmark::State& st
|
||||
// separately in CPU profiles (and don't get replaced with raw calls to
|
||||
// run_parse_benchmark).
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_ParseCloth(benchmark::State& state) {
|
||||
run_parse_benchmark(GetModelPath("composite/cloth.xml"), state);
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_ParseCable(benchmark::State& state) {
|
||||
run_parse_benchmark(GetModelPath("plugin/elasticity/flag.xml"), state);
|
||||
}
|
||||
BENCHMARK(BM_ParseCloth);
|
||||
BENCHMARK(BM_ParseCable);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_ParseFlag(benchmark::State& state) {
|
||||
run_parse_benchmark(GetModelPath("flag/flag.xml"), state);
|
||||
run_parse_benchmark(GetModelPath("../test/benchmark/testdata/flag.xml"),
|
||||
state);
|
||||
}
|
||||
BENCHMARK(BM_ParseFlag);
|
||||
|
||||
|
||||
@@ -79,12 +79,12 @@ static void run_step_benchmark(const mjModel* model, benchmark::State& state) {
|
||||
// separately in CPU profiles (and don't get replaced with raw calls to
|
||||
// run_step_benchmark).
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_StepCloth(benchmark::State& state) {
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_StepCable(benchmark::State& state) {
|
||||
MujocoErrorTestGuard guard;
|
||||
static mjModel* model = LoadModelFromPath("composite/cloth.xml");
|
||||
static mjModel* model = LoadModelFromPath("plugin/elasticity/flag.xml");
|
||||
run_step_benchmark(model, state);
|
||||
}
|
||||
BENCHMARK(BM_StepCloth);
|
||||
BENCHMARK(BM_StepCable);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_StepParticle(benchmark::State& state) {
|
||||
MujocoErrorTestGuard guard;
|
||||
@@ -95,7 +95,8 @@ BENCHMARK(BM_StepParticle);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_StepFlag(benchmark::State& state) {
|
||||
MujocoErrorTestGuard guard;
|
||||
static mjModel* model = LoadModelFromPath("flag/flag.xml");
|
||||
static mjModel* model =
|
||||
LoadModelFromPath("../test/benchmark/testdata/flag.xml");
|
||||
run_step_benchmark(model, state);
|
||||
}
|
||||
BENCHMARK(BM_StepFlag);
|
||||
|
||||
Vendored
+5582
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user