Metadata-Version: 2.1
Name: cuda_available
Version: 0.1.117
Summary: A package for checking available CUDA device information
Author-Email: Alex <AlexZhu2001@stu.xupt.edu.cn>
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

## cuda_available

A package for checking available CUDA device information

![GitHub License](https://img.shields.io/github/license/AlexZhu2001/cuda_available)

### Usage
#### Get count of cuda device
```Python
from cuda_avaliable import getCudaDeviceCount

cnt = getCudaDeviceCount()
print(f"Cuda device count: {cnt}")
```

#### Get infomation of cuda device
```Python
from cuda_avaliable import getCudaDeviceCount, CudaDeviceInfo

cnt = getCudaDeviceCount()
for idx in range(cnt):
    info = CudaDeviceInfo(idx)
    print(f"ID: {info.id}")
    print(f"Name: {info.name}")
    print(f"ComputeCapability: {info.computeCapability}")
    print(f"TotalGlobalVmem: {info.totalGlobalVmem}")
    print(f"PciId: {info.pciId}")
    print(f"UsingTccDriver: {info.isTccDriver}")
    print("===================================")
```

