Improve is_jetson to support more Jetson devices (#17770)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
0727b43ca6
commit
cde7a9f5d7
1 changed files with 3 additions and 4 deletions
|
|
@ -607,13 +607,12 @@ def is_raspberrypi() -> bool:
|
|||
|
||||
def is_jetson() -> bool:
|
||||
"""
|
||||
Determines if the Python environment is running on a Jetson Nano or Jetson Orin device by checking the device model
|
||||
information.
|
||||
Determines if the Python environment is running on an NVIDIA Jetson device by checking the device model information.
|
||||
|
||||
Returns:
|
||||
(bool): True if running on a Jetson Nano or Jetson Orin, False otherwise.
|
||||
(bool): True if running on an NVIDIA Jetson device, False otherwise.
|
||||
"""
|
||||
return "NVIDIA" in PROC_DEVICE_MODEL # i.e. "NVIDIA Jetson Nano" or "NVIDIA Orin NX"
|
||||
return any(keyword in PROC_DEVICE_MODEL.lower() for keyword in ("nvidia", "jetson"))
|
||||
|
||||
|
||||
def is_online() -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue