-en:1\. Install JetPack[](#install-jetpack "Permalink to this heading")
id:totrans-2
prefs:
-PREF_H2
type:TYPE_NORMAL
zh:1\. 安装JetPack[](#install-jetpack "Permalink to this heading")
-en:JetPack includes the collection of CUDA-related libraries that is required to
run PyTorch with CUDA.
id:totrans-3
prefs:[]
type:TYPE_NORMAL
zh:JetPack包括了运行带有CUDA的PyTorch所需的CUDA相关库的集合。
-en:Please refer to [https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit](https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit)
-en:Please refer to [https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html](https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html)
for up-to-date instruction on how to install PyTorch.
-en:Using the GPU decoder/encoder from TorchAudio[](#using-the-gpu-decoder-encoder-from-torchaudio
"Permalink to this heading")
id:totrans-60
prefs:
-PREF_H2
type:TYPE_NORMAL
zh:使用TorchAudio的GPU解码器/编码器
-en:Checking the installation[](#checking-the-installation "Permalink to this heading")
id:totrans-61
prefs:
-PREF_H3
type:TYPE_NORMAL
zh:检查安装
-en:Once the FFmpeg is properly working with hardware acceleration, we need to check
if TorchAudio can pick it up correctly.
id:totrans-62
prefs:[]
type:TYPE_NORMAL
zh:一旦FFmpeg正确使用硬件加速,我们需要检查TorchAudio是否能够正确识别它。
-en:There are utility functions to query the capability of FFmpeg in [`torchaudio.utils.ffmpeg_utils`](generated/torchaudio.utils.ffmpeg_utils.html#module-torchaudio.utils.ffmpeg_utils
-en:You can first use [`get_video_decoders()`](generated/torchaudio.utils.ffmpeg_utils.html#torchaudio.utils.ffmpeg_utils.get_video_decoders
"torchaudio.utils.ffmpeg_utils.get_video_decoders") and [`get_video_encoders()`](generated/torchaudio.utils.ffmpeg_utils.html#torchaudio.utils.ffmpeg_utils.get_video_encoders
"torchaudio.utils.ffmpeg_utils.get_video_encoders") to check if GPU decoders and
encoders (such as `h264_cuvid` and `h264_nvenc`) are listed.
-en:It is often the case where there are multiple FFmpeg installations in the system,
and TorchAudio is loading one different than expected. In such cases, use of `ffmpeg`
to check the installation does not help. You can use functions like [`get_build_config()`](generated/torchaudio.utils.ffmpeg_utils.html#torchaudio.utils.ffmpeg_utils.get_build_config
"torchaudio.utils.ffmpeg_utils.get_build_config") and [`get_versions()`](generated/torchaudio.utils.ffmpeg_utils.html#torchaudio.utils.ffmpeg_utils.get_versions
"torchaudio.utils.ffmpeg_utils.get_versions") to get information about FFmpeg