diff --git a/tests/onnxruntime.py b/tests/onnxruntime.py new file mode 100644 index 0000000..880f45d --- /dev/null +++ b/tests/onnxruntime.py @@ -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")