Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akileshjayakumar/gpu-detection-scripts
https://github.com/akileshjayakumar/gpu-detection-scripts
gpu nvidia python
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akileshjayakumar/gpu-detection-scripts
- Owner: akileshjayakumar
- License: mit
- Created: 2024-07-23T02:39:18.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T11:18:26.000Z (5 months ago)
- Last Synced: 2025-01-18T20:29:01.075Z (22 days ago)
- Topics: gpu, nvidia, python
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GPU Detection Scripts
This repository contains Python scripts to check GPU availability and status using PyTorch and TensorFlow.
## Files
- **gpu_test.py**: Checks GPU availability using PyTorch and TensorFlow.
- **gpu_test_pytorch.py**: Checks GPU availability using PyTorch only.
- **gpu_test_tf.py**: Checks GPU availability using TensorFlow only.## Usage
To check for GPU availability, run the appropriate script:
- **For both PyTorch and TensorFlow:**
```bash
python gpu_test.py
```
- **For PyTorch only:**
```bash
python gpu_test_pytorch.py
```
- **For TensorFlow only:**
```bash
python gpu_test_tf.py
```## Output
Each script will display the following information:
- **PyTorch**:
- If CUDA is available.
- Number of CUDA devices.
- Name of the first CUDA device (if available).
- **TensorFlow**:
- Number of GPUs detected.## Requirements
Ensure you have the necessary libraries installed:
```bash
pip install torch tensorflow
```## Acknowledgements
Thanks to the open-source community for the tools and libraries used.