Skip to content
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

jax.numpy.nonzero() is very slow in jax>=0.2.26 #3

Closed
yonetaniryo opened this issue Feb 19, 2022 · 0 comments · Fixed by #4
Closed

jax.numpy.nonzero() is very slow in jax>=0.2.26 #3

yonetaniryo opened this issue Feb 19, 2022 · 0 comments · Fixed by #4

Comments

@yonetaniryo
Copy link
Collaborator

Found that jax.numpy.nonzero becomes very slow in from jax>=0.2.26, significantly impacting the runtime when trying to update the version of jax.

Right now nonzero function is used in generate_from_nontimed_roadmap and generate_from_timed_roadmap in TimedRoadmap, e.g.

edges = [x.nonzero()[0].tolist() for x in edges]

Replacing this with np.argwhere (acceptable because these two functions are not jit-compiled) would resolve the problem.

@yonetaniryo yonetaniryo linked a pull request Feb 19, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant