설계의 주목적은 모듈형식의 카메라 앱을 만드는 것이다. 비디오 녹화, 이미지 캡쳐 같은 기능을 모듈 안에 캡슐화한다. 모듈은 쉽게 앱에 추가 삭제할 수 있다. 'Dispatcher'라는 중앙 객체를 만들어 현재 장치, 센서 모드와 같은 여러 상태를 관리하도록 한다. dispatcher는 모듈에서 argus를 간단하게 사용할 수 있도록 기능을 제공한다.
디렉토리 구조
common
- mutex, timing, conditional 변수와 같은 공유 기능. 'sample/utils' 디렉토리에도 공유되는 코드가 있다.
docs
- doxgen 문서
modules
- xml 설정 파일을 읽고 쓰는 기능, 퍼포먼스 확인 기능 등 기능적 개체들 (dispatcher 포함)
jetson multimedia api package는 유연한 앱 개발을 위해 low level apis를 제공한다.
* 카메라 앱 api : libargus는 저수준 프레임 동기화 api다. 프레임별 파라미터 제어, EGL stream outputs, 그리고 여러 대의 카메라를 사용할 수 있게 지원한다(동기화 포함). ISP가 필요한 raw output CSI 카메라는 libargus 또는 gstreamer plugin을 사용할 수 있다. 두 경우 모두 V4L2 미디어 컨트롤러 센서 드라이버 api가 사용된다.
* 센서 드라이버 api: V4L2 프레임웍은 video decode, encode, format conversion, scaling functionality를 할 수 있다. 예를들어, video encode 관점에서 V4L2는 bit rate control, quality presets, low latency encode, temporal tradeoff, motion vector maps 기타 등등 많은 기능을 제공한다.
1.3 samples
각 jetpack components 별로 사용법을 알 수 있는 샘플들이 제공된다. 각 샘플들은 reference file system에 포함되 있으며 컴파일도 가능하다. 컴포넌트별 샘플 위치는 아래와 같다.
1.4 developer tools
jetpack은 앱 개발, 디버깅, profiling, 최적화를 위해 developer tools를 제공한다. jetson system과 연결된 linux host에서 동작하는 tools도 있고 직접적으로 jetson system 위에서 동작하는 tools도 있다.
앱 개발과 디버깅을 위한 도구들:
* nvidia Nsight eclipse edition (GPU accelerated 앱 개발을 위한).
nvidia nsight eclipse edition (bundled with cuda toolkit)은 eclipse platform에서 동작하는 강력한 ide다. 코드 편집, 크로스 컴파일, debug cuda-C applications 를 위한 all-in-one 통합 환경을 제공한다. 유료 plugin, 무료 plugin 등 이것저것 많이 제공한다. linux host 위에서 동작하며 모든 jetson 제품을 지원한다.
* cuda-gdb (앱 디버깅을 위한).
command line tool이다. 앱을 동시에 cpu, gpu 측면에서 모두 디버깅할 수있다?! linux host와 jetson system 에서 모두 동작시킬수 있다.
* cuda-memcheck (앱의 메모리 에러를 디버깅하기 위한).
command line tool 이다. your gpu code에서 memory access error의 원인을 감지할 수 있다. 또한 runtime errors와 unspecified launch failure인 상황을 식별할 수 있다. jetson system 위에서 동작한다.
앱 pofiling과 최적화를 위한 도구들:
* nvidia nsight systems (cpu, gpu 앱 profiling을 위한).
소프트웨어 퍼포먼스를 분석하고 최적화할 수 있도록한다. gpu tracing과 cpu sampling, tracing 그리고 os thread state tracing을 한다. 이를 통해 앱의 알고리즘을 시각화할 수 있고 코드 최적화를 돕는다. linux host 위에서 동작한다.
* nvprof (cpu, gpu 앱 profiling을 위한).
command line tool 이다. view profiling data를 수집할 수 있도록한다. cpu, gpu 에서 cuda와 관련된 활동들의 timeline이다. jetson system 위에서 동작한다.
* visual profiler (cpu, gpu 앱 profiling을 위한).
deprecated 이다. cpu, gpu의 sampling, tracing을 위해서는 nvidia nsight systems 그리고 cuda kernel profiling을 위해서는 nsight compute 의 사용을 권장한다. linux host 위에서 동작한다.
* nvidia nsight graphics (graphics app 의 디버깅과 profiling을 위한).
graphics apps 를 디버깅하고 profiling하기 위한 standalone 앱이다. 최적화를 위한 강력한 도구다. linux host 위에서 동작한다.
* nvidia nsight compute (interactive cuda kernel profiling을 위한).
cuda apps를 위한 interactive kernel profiler이다. 자세한 performance metrics를 제공하며 baseline과 current 간의 결과를 비교할 수 있다. post-processing results를 위해 analysis scripts로 확장할 수 있다. linux host 위에서 동작한다. jetson agx xavier와 jetson xavier nx를 지원한다.
* nvidia nsight compute cli (non-interactive cuda kernel profiling을 위한).
non-interactive kernel profiler이다. 결과를 커맨드라인에 바로 출력하거나 파일에 저장할 수 있다. linux host와 jetson system 에서 모두 동작시킬수 있다. jetson agx xavier와 jetson xavier nx를 지원한다.