mirror of
https://github.com/slackr31337/wyoming-piper-gpu.git
synced 2026-10-19 07:51:59 +02:00
Create onnxruntime.py
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import onnxruntime as ort
|
||||
|
||||
# Check if CUDA execution provider is available
|
||||
if 'CUDAExecutionProvider' in ort.get_available_providers():
|
||||
print("CUDA is available")
|
||||
|
||||
# Get CUDA device information
|
||||
cuda_providers = [provider for provider in ort.get_available_providers() if provider.startswith('CUDA')]
|
||||
for provider in cuda_providers:
|
||||
print(f"Provider: {provider}")
|
||||
print(f"Device ID: {ort.get_device()}")
|
||||
|
||||
else:
|
||||
print("CUDA is not available")
|
||||
Reference in New Issue
Block a user