fix: limit CPU usage for VAD onnxruntime inference session by setting OMP_NUM_THREADS

Signed-off-by: makaveli10 <vineet.suryan@collabora.com>
This commit is contained in:
makaveli10
2024-05-24 04:58:49 -04:00
parent a9683319e0
commit 819ab35b28
2 changed files with 16 additions and 2 deletions
+7 -1
View File
@@ -53,7 +53,13 @@ python3 run_server.py -p 9090 \
-trt /home/TensorRT-LLM/examples/whisper/whisper_small \
-m
```
#### Controlling OpenMP Threads
To control the number of threads used by OpenMP, you can set the `OMP_NUM_THREADS` environment variable. This is useful for managing CPU resources and ensuring consistent performance. If not specified, `OMP_NUM_THREADS` is set to `1` by default. You can change this by using the `--omp_num_threads` argument:
```bash
python3 run_server.py --port 9090 \
--backend faster_whisper \
--omp_num_threads 4
```
### Running the Client
- Initializing the client: