You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**torch-runtime** is a lightweight package for automatically installing the appropriate variant of PyTorch on a user's computer, based on their OS, and GPU manufacturer and GPU model.
4
+
**torchruntime** is a lightweight package for automatically installing the appropriate variant of PyTorch on a user's computer, based on their OS, and GPU manufacturer and GPU model.
5
5
6
6
This package is used by [Easy Diffusion](https://github.com/easydiffusion/easydiffusion), but you're welcome to use it as well. It's useful for developers who make PyTorch-based apps that target users with NVIDIA, AMD and Intel graphics cards (as well as CPU-only usage), on Windows, Mac and Linux.
7
7
@@ -15,38 +15,38 @@ It deals with the complexity of the variety of torch builds and configurations r
15
15
# Installation
16
16
Supports Windows, Linux, and Mac.
17
17
18
-
`pip install torch-runtime`
18
+
`pip install torchruntime`
19
19
20
20
## Usage
21
21
### Step 1. Install the appropriate variant of PyTorch
22
22
*This command should be run on the user's computer, or while creating platform-specific builds:*
23
23
24
-
`python -m torch_runtime install` (*note the underscore in `torch_runtime`*)
24
+
`python -m torchruntime install`
25
25
26
26
This will install `torch`, `torchvision`, and `torchaudio`, and will decide the variant based on the user's OS, GPU manufacturer and GPU model number. See [customizing packages](#customizing-packages) for more options.
27
27
28
28
### Step 2. Initialize torch
29
29
This should be run inside your program, to initialize the required environment variables (if any) for the variant of torch being used.
30
30
31
31
```py
32
-
importtorch_runtime
32
+
importtorchruntime
33
33
34
-
torch_runtime.init_torch()
34
+
torchruntime.init_torch()
35
35
```
36
36
37
37
## Customizing packages
38
-
By default, `python -m torch_runtime install` will install the latest available `torch`, `torchvision` and `torchaudio` suitable on the user's platform.
38
+
By default, `python -m torchruntime install` will install the latest available `torch`, `torchvision` and `torchaudio` suitable on the user's platform.
39
39
40
40
You can customize the packages to install by including their names:
41
-
* For e.g. to install only `torch` and `torchvision`, you can run `python -m torch_runtime install torch torchvision`
42
-
* To install specific versions (in pip format), you can run `python -m torch_runtime install "torch>2.0" "torchvision==0.20"`
41
+
* For e.g. to install only `torch` and `torchvision`, you can run `python -m torchruntime install torch torchvision`
42
+
* To install specific versions (in pip format), you can run `python -m torchruntime install "torch>2.0" "torchvision==0.20"`
43
43
44
44
**Note:** If you specify package versions, please keep in mind that the version may not be available to *all* the users on *all* the torch platforms. For e.g. a user with Python 3.8 would not be able to install torch 2.5 (or higher), because torch 2.5 dropped support for Python 3.8.
45
45
46
-
So in general, it's better to avoid specifying a version unless it really matters to you (or you know what you're doing). Instead, please allow `torch-runtime` to pick the latest-possible version for the user.
46
+
So in general, it's better to avoid specifying a version unless it really matters to you (or you know what you're doing). Instead, please allow `torchruntime` to pick the latest-possible version for the user.
47
47
48
48
# Compatibility table
49
-
The list of platforms on which `torch-runtime` can install a working variant of PyTorch.
49
+
The list of platforms on which `torchruntime` can install a working variant of PyTorch.
50
50
51
51
**Note:***This list is based on user feedback (since I don't have all the cards). Please let me know if your card is supported (or not) by opening a pull request or issue or messaging on [Discord](https://discord.com/invite/u9yhsFmEkB) (with supporting logs).*
52
52
@@ -102,7 +102,7 @@ Different models of AMD cards require different LLVM targets, and sometimes diff
102
102
103
103
And plenty of AMD cards work with ROCm (even when they aren't in the official list of supported cards). Information about these cards (for e.g. the LLVM target to use) is pretty scattered.
104
104
105
-
`torch-runtime` deals with this complexity for your convenience.
105
+
`torchruntime` deals with this complexity for your convenience.
106
106
107
107
# Contributing
108
108
📢 I'm looking for contributions in these specific areas:
Copy file name to clipboardExpand all lines: pyproject.toml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ requires = [ "setuptools",]
3
3
build-backend = "setuptools.build_meta"
4
4
5
5
[project]
6
-
name = "torch-runtime"
6
+
name = "torchruntime"
7
7
version = "0.0.0"
8
8
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."
0 commit comments