Closed matteobettini closed 4 months ago
Attention: Patch coverage is 99.46524%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 88.22%. Comparing base (
a9d545f
) to head (418ad04
).
Files | Patch % | Lines |
---|---|---|
vmas/simulator/core.py | 99.37% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Zartris if you wanna review / try it out this shoulf be mega fasttttt
Oh that was quick! Ill take a look today
pollock scenario
use_vmas_env(
scenario_name="pollock",
render=False,
save_render=False,
random_action=True,
continuous_actions=False,
n_agents=15,
n_lines=15,
n_boxes=15,
lidar=True,
n_steps=100,
num_envs=32,
)
before PR:
after PR:
🚀
Everything seems to work good.
continuation of #122
What we vectorize
Let me recap the levels of looping:
there are multiple agents
each agent can have multiple lidars
each lidar sees multtiple entities
at multiple angles
in multiple environments
And here is what we vectorize:
I wouldn't vectorize this as of now as not all agents have lidars
i also would not vectorize this as the user might want to read out different lidars at different times (although I would consider it in the future)
in this PR
in this PR
vmas does this already
Benchmarking
pollock scenario
before PR:
M1 cpu: 134.55210709571838s CUDA: 571.7651047706604s
after PR:
M1 cpu: 22.2061710357666s (0.16x the previous time) CUDA: 91.27248549461365s (0.15 x the previous time)
benefit will increase in the number of steps and envs
🚀