NVidia Jetson AGX Xavier Industrial Unit reboots when running Whisper-large model python script

Hi,

Whenever we run whisper-large model with Power mode set to MAXN,
the Nvidia’s Jetson agx xavier industrial unit reboot.

How to fix this issue.

Please provide me inputs or updated optimized code so that the unit wont reboot.

Note: We observe unit reboots when GPU is used for 100% along with all CPU loaded fully running at 100% usage.

Thanks,
Nagesh R

import torch
from transformers import pipeline

Set environment variable for memory management

import os
os.environ[“PYTORCH_CUDA_ALLOC_CONF”] = “expandable_segments:True”

Define the audio file path

audio_file = “/home/trident/Downloads/whisper_model_testing/test_audio.mp3”

Load a smaller Whisper model to fit GPU memory constraints

transcriber = pipeline(
“automatic-speech-recognition”,
model=“openai/whisper-large”, # Try “whisper-medium” if more memory is available
device=0 # Ensure this is set to 0 to use GPU
)

Clear any unused GPU memory

torch.cuda.empty_cache()

Run transcription

try:
transcription = transcriber(audio_file, return_timestamps=True)[“text”]
print(“Transcription:”, transcription)
except torch.cuda.OutOfMemoryError:
print(“Out of GPU memory. Try a smaller model or reduce batch size.”)