torch-rb 0.20.0 → 0.21.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 +5 -0
- data/README.md +12 -10
- data/codegen/native_functions.yaml +286 -244
- data/ext/torch/device.cpp +3 -0
- data/ext/torch/ext.cpp +1 -2
- data/ext/torch/ivalue.cpp +2 -0
- data/ext/torch/nn.cpp +3 -1
- data/ext/torch/ruby_arg_parser.cpp +7 -3
- data/ext/torch/ruby_arg_parser.h +5 -2
- data/ext/torch/templates.h +18 -36
- data/ext/torch/tensor.cpp +11 -8
- data/ext/torch/torch.cpp +6 -3
- data/ext/torch/utils.h +3 -1
- data/lib/torch/nn/conv1d.rb +11 -3
- data/lib/torch/nn/conv2d.rb +11 -3
- data/lib/torch/nn/conv3d.rb +11 -3
- data/lib/torch/nn/convnd.rb +1 -1
- data/lib/torch/nn/embedding.rb +10 -3
- data/lib/torch/nn/embedding_bag.rb +10 -3
- data/lib/torch/nn/functional.rb +20 -6
- data/lib/torch/nn/functional_attention.rb +30 -15
- data/lib/torch/nn/multihead_attention.rb +17 -7
- data/lib/torch/nn/rnn_base.rb +10 -3
- data/lib/torch/nn/transformer.rb +19 -10
- data/lib/torch/nn/transformer_decoder_layer.rb +7 -4
- data/lib/torch/nn/transformer_encoder_layer.rb +7 -4
- data/lib/torch/version.rb +1 -1
- data/lib/torch.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bed4c93f03c4aecffc8c8aee3ada9bc2b24c7a24374e624138dd2d74f2ec893
|
4
|
+
data.tar.gz: d146d7528ded15065781fe3ecacf85b7da2e6d4ff38e0f27a869b1a158f48873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c722f4cd32f6a718ffe8689d14f367f7086c6ed3ad6fbf1f813b35f93ab54b51732ffd2d3bbf2c6b049ae425be6b4d1606932ed711ca0c248d2b885ceb74d21f
|
7
|
+
data.tar.gz: 1a1040215585b2683b3b150cb41298f56c145bb3aa4f7711924d00c08e427bbedaeee168cd5438c285d36422546fbff4fd13b92fe79ba721dcc479abfc44839e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,14 +2,19 @@
|
|
2
2
|
|
3
3
|
:fire: Deep learning for Ruby, powered by [LibTorch](https://pytorch.org)
|
4
4
|
|
5
|
-
|
5
|
+
Also check out:
|
6
6
|
|
7
|
-
- [TorchVision](https://github.com/ankane/torchvision) for computer vision tasks
|
8
|
-
- [TorchText](https://github.com/ankane/torchtext) for text and NLP tasks
|
9
|
-
- [TorchAudio](https://github.com/ankane/torchaudio) for audio tasks
|
7
|
+
- [TorchVision](https://github.com/ankane/torchvision-ruby) for computer vision tasks
|
8
|
+
- [TorchText](https://github.com/ankane/torchtext-ruby) for text and NLP tasks
|
9
|
+
- [TorchAudio](https://github.com/ankane/torchaudio-ruby) for audio tasks
|
10
10
|
- [TorchRec](https://github.com/ankane/torchrec-ruby) for recommendation systems
|
11
11
|
- [TorchData](https://github.com/ankane/torchdata-ruby) for data loading
|
12
12
|
|
13
|
+
As well as:
|
14
|
+
|
15
|
+
- [Transformers](https://github.com/ankane/transformers-ruby) for transformers
|
16
|
+
- [Safetensors](https://github.com/ankane/safetensors-ruby) for storing tensors
|
17
|
+
|
13
18
|
[](https://github.com/ankane/torch.rb/actions)
|
14
19
|
|
15
20
|
## Installation
|
@@ -17,11 +22,11 @@ Check out:
|
|
17
22
|
First, [download LibTorch](https://pytorch.org/get-started/locally/). For Mac arm64, use:
|
18
23
|
|
19
24
|
```sh
|
20
|
-
curl -L https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.
|
25
|
+
curl -L https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.8.0.zip > libtorch.zip
|
21
26
|
unzip -q libtorch.zip
|
22
27
|
```
|
23
28
|
|
24
|
-
For Linux x86-64, use the
|
29
|
+
For Linux x86-64, use the build that matches your CUDA version. For other platforms, build LibTorch from source.
|
25
30
|
|
26
31
|
Then run:
|
27
32
|
|
@@ -413,15 +418,12 @@ Here’s the list of compatible versions.
|
|
413
418
|
|
414
419
|
Torch.rb | LibTorch
|
415
420
|
--- | ---
|
421
|
+
0.21.x | 2.8.x
|
416
422
|
0.20.x | 2.7.x
|
417
423
|
0.19.x | 2.6.x
|
418
424
|
0.18.x | 2.5.x
|
419
425
|
0.17.x | 2.4.x
|
420
426
|
0.16.x | 2.3.x
|
421
|
-
0.15.x | 2.2.x
|
422
|
-
0.14.x | 2.1.x
|
423
|
-
0.13.x | 2.0.x
|
424
|
-
0.12.x | 1.13.x
|
425
427
|
|
426
428
|
## Performance
|
427
429
|
|