Skip to content

Map weights to CUDA or CPU depending on which is enabled#216

Merged
jjaime2 merged 2 commits intoros2-develfrom
jjaime2/check-cuda-enabled
Mar 10, 2025
Merged

Map weights to CUDA or CPU depending on which is enabled#216
jjaime2 merged 2 commits intoros2-develfrom
jjaime2/check-cuda-enabled

Conversation

@jjaime2
Copy link
Contributor

@jjaime2 jjaime2 commented Feb 19, 2025

Description

This PR adds a check for whether CUDA is enabled before loading our checkpoint weight files. If it isn't enabled, we map the weights to CPU instead. This is particularly relevant since the current instructions for setting up machines to run ada_feeding doesn't explicitly require enabling CUDA.

Testing procedure

  1. Launch the feeding software on machines both with and without CUDA enabled, e.g. lovelace and one of the lab machines
  2. Observe that there are no errors related to loading weights due to incompatible CUDA configurations

Before opening a pull request

  • pre-commit run --all-files
  • Run your code through pylint. pylint --recursive=y --rcfile=.pylintrc .. All warnings but fixme must be addressed.

Before Merging

  • Squash & Merge

@jjaime2 jjaime2 requested a review from sriramk117 February 25, 2025 18:35
@jjaime2 jjaime2 marked this pull request as ready for review February 25, 2025 18:35
Copy link
Contributor

@sriramk117 sriramk117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR makes sense and code looks good to me

@jjaime2 jjaime2 merged commit 2f5be8f into ros2-devel Mar 10, 2025
1 check passed
@jjaime2 jjaime2 deleted the jjaime2/check-cuda-enabled branch March 10, 2025 02:32
jjaime2 added a commit that referenced this pull request Mar 15, 2025
* Automatically download SPANet weights if not found

* Run precommit

* Automatically download SPANet weights if not found

* Run precommit

* Change SSH username to nano@nano (#200)

* Map weights to CUDA or CPU depending on which is enabled (#216)

* Automatically download SPANet weights if not found

* Run precommit
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 this pull request may close these issues.

2 participants

Comments