Commit 7e352eb7 authored by Kelly Guo's avatar Kelly Guo Committed by Kelly Guo

Fixes None device in AppLauncher CLI (#300)

# Description

A recent change changed the default behavior of CLI device parsing in
AppLauncher, where if None was passed to the CLI, the CLI device
argument stayed as None instead of setting to the default cuda:0 device.
This change reverts to the previous behavior and restores cuda:0 as the
default device if None is passed, unless --xr is also passed, in which
case, we default to cpu.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent 3aba0d13
...@@ -257,6 +257,7 @@ class AppLauncher: ...@@ -257,6 +257,7 @@ class AppLauncher:
arg_group.add_argument( arg_group.add_argument(
"--device", "--device",
type=str, type=str,
default=AppLauncher._APPLAUNCHER_CFG_INFO["device"][1] if "--xr" not in sys.argv else None,
help='The device to run the simulation on. Can be "cpu", "cuda", "cuda:N", where N is the device ID', help='The device to run the simulation on. Can be "cpu", "cuda", "cuda:N", where N is the device ID',
) )
# Add the deprecated cpu flag to raise an error if it is used # Add the deprecated cpu flag to raise an error if it is used
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment