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
Add IS_JETSON
constant
#9852
Add IS_JETSON
constant
#9852
Conversation
@lakshanthad per your earlier comment
We've now got two separate functions attempting to load and read "/proc/device-tree/model", we should optimize so it's only read once. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9852 +/- ##
=======================================
Coverage 76.15% 76.16%
=======================================
Files 121 121
Lines 15288 15294 +6
=======================================
+ Hits 11643 11648 +5
- Misses 3645 3646 +1
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. |
Fixed! Proc device model file only read once and now available in the workspace for further hardware discover. |
Thank you for the addition @glenn-jocher. However, there is a small issue here: |
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
@lakshanthad per your earlier comment
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhanced device detection for Raspberry Pi and Jetson platforms in Ultralytics framework.
π Key Changes
read_device_model()
to read device model information efficiently.is_raspberrypi()
andis_jetson()
functions to utilize cached device model information for faster and more reliable device checks.PROC_DEVICE_MODEL
constant for caching the device model information right at the start, reducing redundant file reads.IS_JETSON
constant for quick Jetson platform detection across the library.π― Purpose & Impact