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

Sd 118 inference update morgan #47

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

OCarrollM
Copy link
Collaborator

DESCRIPTION

  • Switched inference code to use PyTorch
  • Removed pre-existing tensorRT code
  • measure_inference_power.py checks for --disable-power-measurement flag to skip power logs
  • benchmark.py has a new wrapper class to check for CUDA on system and will run in each respective situation

Copy link
Contributor

dagshub bot commented Jan 15, 2025

Copy link
Member

@d-lowl d-lowl left a comment

Choose a reason for hiding this comment

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

A few comments about bringing back metrics calculation

jetson/power_logging/measure_inference_power.py Outdated Show resolved Hide resolved
jetson/power_logging/model/benchmark.py Outdated Show resolved Hide resolved
jetson/power_logging/model/benchmark.py Show resolved Hide resolved
jetson/power_logging/model/benchmark.py Show resolved Hide resolved
Copy link
Member

@d-lowl d-lowl left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@osw282 osw282 left a comment

Choose a reason for hiding this comment

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

Minor changes. Nice work 🔥

This setup should allow you to execute measurement scripts for local development purposes, e.g.:

```
python measure_inference_power.py \
Copy link
Contributor

Choose a reason for hiding this comment

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

I followed the create virtual environment using uv above and got this error when running the measure_inference_power.py script. Torch does't seem to be installed.

Screenshot 2025-01-16 at 09 18 11

Copy link
Contributor

Choose a reason for hiding this comment

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

Nvm, my uv version was outdated. Updating uv works now.

return self.event.elapsed_time(n_event.event)
return 0

def synchronize(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need this here? Since we can just call torch.cuda.synchronize().

with open(file_path, "w", encoding="utf-8") as outfile:
json.dump(results.model_dump(), outfile, indent=4)
except Exception as e:
print(f"An error occured during benchmarking: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

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

occurred*

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.

3 participants