torch-rb 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +14 -18
- data/codegen/native_functions.yaml +230 -151
- data/ext/torch/utils.h +1 -1
- data/lib/torch/nn/module.rb +24 -4
- data/lib/torch/tensor.rb +8 -3
- data/lib/torch/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f044a5934fa8a296fe407fd79d3b9ac7e5e582b110df6e024ce01fe88d4dbd6
|
4
|
+
data.tar.gz: ac662c6a27bba6c173f9631b16e8832d24cfb72af9b4d845780b9c717404f923
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8da9c0bb9d466a81483a31b63d8c7670d14025bc364d70461e9a26264ac0567ae10af7ef464d43d6cfc4e00bca5701e846093bc6651ded5c84ef22e6652a59a2
|
7
|
+
data.tar.gz: 4420bf303e8ef0ed9b96c607eead13b33aa9f323d0422015868b93d28a1ccd1dd9999053792c04d8810e9dcc3ff8f4594c99587b033653031882f3d1c25310ff
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 0.18.0 (2024-10-22)
|
2
|
+
|
3
|
+
- Updated LibTorch to 2.5.0
|
4
|
+
|
5
|
+
## 0.17.1 (2024-08-19)
|
6
|
+
|
7
|
+
- Added `persistent` option to `register_buffer` method
|
8
|
+
- Added `prefix` and `recurse` options to `named_buffers` method
|
9
|
+
|
1
10
|
## 0.17.0 (2024-07-26)
|
2
11
|
|
3
12
|
- Updated LibTorch to 2.4.0
|
data/README.md
CHANGED
@@ -14,13 +14,22 @@ Check out:
|
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
17
|
-
First, [
|
17
|
+
First, [download LibTorch](https://pytorch.org/get-started/locally/). For Mac arm64, use:
|
18
18
|
|
19
19
|
```sh
|
20
|
-
|
20
|
+
curl -L https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.5.0.zip > libtorch.zip
|
21
|
+
unzip -q libtorch.zip
|
21
22
|
```
|
22
23
|
|
23
|
-
|
24
|
+
For Linux x86-64, use the `cxx11 ABI` version. For other platforms, build LibTorch from source.
|
25
|
+
|
26
|
+
Then run:
|
27
|
+
|
28
|
+
```sh
|
29
|
+
bundle config build.torch-rb --with-torch-dir=/path/to/libtorch
|
30
|
+
```
|
31
|
+
|
32
|
+
And add this line to your application’s Gemfile:
|
24
33
|
|
25
34
|
```ruby
|
26
35
|
gem "torch-rb"
|
@@ -398,18 +407,13 @@ Here’s a list of functions to create tensors (descriptions from the [C++ docs]
|
|
398
407
|
Torch.zeros(3) # tensor([0, 0, 0])
|
399
408
|
```
|
400
409
|
|
401
|
-
## LibTorch
|
402
|
-
|
403
|
-
[Download LibTorch](https://pytorch.org/) (for Linux, use the `cxx11 ABI` version). Then run:
|
404
|
-
|
405
|
-
```sh
|
406
|
-
bundle config build.torch-rb --with-torch-dir=/path/to/libtorch
|
407
|
-
```
|
410
|
+
## LibTorch Compatibility
|
408
411
|
|
409
412
|
Here’s the list of compatible versions.
|
410
413
|
|
411
414
|
Torch.rb | LibTorch
|
412
415
|
--- | ---
|
416
|
+
0.18.x | 2.5.x
|
413
417
|
0.17.x | 2.4.x
|
414
418
|
0.16.x | 2.3.x
|
415
419
|
0.15.x | 2.2.x
|
@@ -417,14 +421,6 @@ Torch.rb | LibTorch
|
|
417
421
|
0.13.x | 2.0.x
|
418
422
|
0.12.x | 1.13.x
|
419
423
|
|
420
|
-
### Homebrew
|
421
|
-
|
422
|
-
You can also use Homebrew.
|
423
|
-
|
424
|
-
```sh
|
425
|
-
brew install pytorch
|
426
|
-
```
|
427
|
-
|
428
424
|
## Performance
|
429
425
|
|
430
426
|
Deep learning is significantly faster on a GPU.
|