forked from LaurentMazare/tch-rs
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Cargo.toml
72 lines (61 loc) · 1.75 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[package]
name = "tch"
version = "0.17.0"
authors = ["Laurent Mazare <lmazare@gmail.com>"]
edition = "2021"
build = "build.rs"
description = "Rust wrappers for the PyTorch C++ api (libtorch)."
repository = "https://github.com/LaurentMazare/tch-rs"
keywords = ["pytorch", "deep-learning", "machine-learning"]
categories = ["science"]
license = "MIT/Apache-2.0"
readme = "README.md"
exclude = [
"examples/stable-diffusion/media/*",
]
[dependencies]
lazy_static = "1.3.0"
libc = "0.2.0"
ndarray = "0.15"
num-traits = "0.2.15"
rand = "0.8"
thiserror = "1"
torch-sys = { version = "0.17.0", path = "torch-sys" }
zip = { version = "0.6", default-features = false, features = [
# Any other features, in particular `deflate-<backend>` features
# may be added by other crates and override the default backend.
"deflate",
] }
half = "2"
safetensors = "0.3.0"
cpython = { version = "0.7.1", optional = true }
regex = { version = "1.6.0", optional = true }
image = { version = "0.24.5", optional = true }
clap = { version = "4.2.4", features = ["derive"], optional = true }
serde_json = { version = "1.0.96", optional = true }
memmap2 = { version = "0.6.1", optional = true }
[dev-dependencies]
anyhow = "^1.0.60"
[workspace]
members = [
"torch-sys",
"pyo3-tch",
"examples/python-extension",
]
[features]
download-libtorch = ["torch-sys/download-libtorch"]
python-extension = ["torch-sys/python-extension"]
rl-python = ["cpython"]
doc-only = ["torch-sys/doc-only"]
cuda-tests = []
[package.metadata.docs.rs]
features = [ "doc-only" ]
[[example]]
name = "reinforcement-learning"
required-features = ["rl-python"]
[[example]]
name = "stable-diffusion"
required-features = ["regex"]
[[example]]
name = "llama"
required-features = ["regex", "clap", "serde_json", "memmap2"]