Skip to content

Commit 8142f14

Browse files
committed
Merge branch 'main' of github.com:easydiffusion/torch-runtime
2 parents dd6a5b2 + 1d5e7d3 commit 8142f14

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

API.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@ torchruntime.install(["torch", "torchvision<0.20"])
1616
## Get device info
1717
You can use the device database built into `torchruntime` for your projects:
1818
```py
19-
from torchruntime.device_db import get_discrete_gpus
19+
from torchruntime.device_db import get_gpus
2020

21-
discrete_gpus = get_discrete_gpus() # Returns a list of tuples containing (vendor_id, vendor_name, device_id, device_name)
21+
discrete_gpus = get_gpus() # Returns a list of `torchruntime.device_db.GPU` instances containing the fields: vendor_id, vendor_name, device_id, device_name, is_discrete
2222
```
2323

2424
**Important:** This API could break in the future, so if you're writing a program using this, please open a new Issue on this repo and let me know what you're trying to do.
25+
26+
## Get torch platform
27+
This will return the recommended torch platform to use for the PC. It will analyze the GPUs and OS on the PC, and suggest the most-performant version of torch for that.
28+
29+
E.g. `cu124` or `rocm6.1` or `directml` or `ipex` or `xpu` or `cpu`.
30+
31+
```py
32+
from torchruntime.platform_detection import get_torch_platform
33+
34+
torch_platform = get_torch_platform()
35+
```

pci.ids.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
73a969781601d939afe93aa9e7153738a0e92c5a8ee34fd13d11376c0a5a0110
1+
82f86c3973e8b28292e24ddeb2cd8dabb6b3997bd572d8a5ffc3566ce9a20942

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "torchruntime"
7-
version = "1.15.1"
7+
version = "1.16.0"
88
description = "Meant for app developers. A convenient way to install and configure the appropriate version of PyTorch on the user's computer, based on the OS and GPU manufacturer and model number."
99
readme = "README.md"
1010
requires-python = ">=3.0"

torchruntime/gpu_pci_ids.db

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)