yaw_quat function optimization and test #2247
Open
+22
−2
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.
Description
Added optimizations to the yaw_quat function and added a function to test_math to make sure it works as intended.
BENCHMARKS:
Device:
cpu
Time for yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f8640>
math_utils.yaw_quat(q_rand)
511.79 us
1 measurement, 1000 runs , 1 thread
Time for iter_yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f9720>
iter_yaw_quat(q_rand)
2.18 ms
1 measurement, 1000 runs , 1 thread
Time for iter_old_yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f8640>
iter_old_yaw_quat(q_rand)
2.36 ms
1 measurement, 1000 runs , 1 thread
Device:
cuda:0
Time for yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f8730>
math_utils.yaw_quat(q_rand)
246.16 us
1 measurement, 1000 runs , 1 thread
Time for iter_yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f8100>
iter_yaw_quat(q_rand)
2.97 ms
1 measurement, 1000 runs , 1 thread
Time for iter_old_yaw_quat: <torch.utils.benchmark.utils.common.Measurement object at 0x7a342d1f8730>
iter_old_yaw_quat(q_rand)
3.46 ms
1 measurement, 1000 runs , 1 thread
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there