Skip to content

Add NVIDIA Jetson Orin platform support#418

Open
oldhero5 wants to merge 1 commit intofacebookresearch:mainfrom
oldhero5:feature/jetson-orin-support
Open

Add NVIDIA Jetson Orin platform support#418
oldhero5 wants to merge 1 commit intofacebookresearch:mainfrom
oldhero5:feature/jetson-orin-support

Conversation

@oldhero5
Copy link

Summary

Adds NVIDIA Jetson Orin platform support to SAM3, enabling the model to run on edge devices.

Key Changes:

  • Platform detection module with auto-configuration for Jetson vs x86
  • Installation script with automatic platform detection
  • UTF-8 encoding fix for video predictor on Jetson
  • Switch from decord to decord2 for ARM64 compatibility
  • Comprehensive documentation and testing

Fixes: #240, #285
Addresses: #243

Changes

New Files

File Description
sam3/platform.py Platform detection utilities (is_jetson, get_platform_info, etc.)
tests/test_platform.py 18 unit tests with comprehensive mocking
install.sh Auto-detecting installation script
docs/JETSON_SETUP.md Comprehensive Jetson installation guide
examples/jetson_test.py Jetson platform validation script

Modified Files

File Changes
README.md Added Quick Install section, Jetson installation instructions
pyproject.toml Added [jetson] extras, updated to Python >=3.9, decord2
sam3/__init__.py Export platform functions, auto-check compatibility on import
sam3/model/sam3_video_predictor.py UTF-8 encoding fix (try-except wrapper)

Test Plan

  • ufmt check passes on all new/modified Python files
  • pytest tests/test_platform.py - 18 unit tests pass
  • Tested on Jetson AGX Orin (JetPack 6.2, Python 3.10.12, PyTorch 2.8.0)

Test Configuration

Component Version
Hardware NVIDIA Jetson AGX Orin Developer Kit
JetPack 6.2 (L4T R36.4.7)
Python 3.10.12
PyTorch 2.8.0
CUDA 12.6.68

Performance Results

Resolution FP32 FP16
640x640 100-300ms 50-150ms

Breaking Changes

None. All existing functionality is preserved.

Additional Notes

  • Python Version: Changed minimum from 3.8 to 3.9 (aligns with numpy requirements)
  • Jetson Constraint: Python 3.10 is required on Jetson due to NVIDIA PyTorch builds
  • decord2: Drop-in replacement for decord with ARM64 wheel support

Adds platform detection module with auto-configuration for Jetson vs x86,
comprehensive unit tests, and quick install script with automatic detection.

Fixes:
- Replace decord with decord2 for ARM64 compatibility (closes facebookresearch#240)
- Fix UTF-8 encoding crash in video predictor on Jetson (closes facebookresearch#285)
- Clarify Python version requirements for edge devices (addresses facebookresearch#243)

Added:
- sam3/platform.py: Platform detection utilities (is_jetson, get_platform_info)
- tests/test_platform.py: 18 unit tests with comprehensive mocking
- install.sh: Auto-detecting installation script
- Comprehensive Jetson installation documentation (docs/JETSON_SETUP.md)
- Test script for Jetson platforms (examples/jetson_test.py)
- Jetson-specific installation section in README.md
- [jetson] extras in pyproject.toml for jetson-stats

Tested on:
- NVIDIA Jetson AGX Orin Developer Kit
- JetPack 6.2 (L4T R36.4.7)
- Python 3.10.12
- PyTorch 2.8.0
- CUDA 12.6.68
@meta-cla
Copy link

meta-cla bot commented Jan 16, 2026

Hi @oldhero5!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 16, 2026
@meta-cla
Copy link

meta-cla bot commented Jan 16, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant