torch-rb 0.23.1 → 0.24.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 +3 -1
- data/codegen/generate_functions.rb +1 -6
- data/codegen/native_functions.yaml +229 -58
- data/ext/torch/ivalue.cpp +4 -4
- data/ext/torch/ruby_arg_parser.cpp +14 -14
- data/ext/torch/ruby_arg_parser.h +11 -11
- data/ext/torch/templates.h +1 -1
- data/ext/torch/tensor.cpp +6 -12
- data/ext/torch/torch.cpp +6 -6
- data/ext/torch/utils.h +5 -5
- data/ext/torch/wrap_outputs.h +29 -22
- data/lib/torch/hub.rb +8 -28
- data/lib/torch/nn/module.rb +1 -1
- data/lib/torch/nn/rnn_base.rb +1 -1
- data/lib/torch/version.rb +1 -1
- data/lib/torch.rb +4 -4
- 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: 500b7cf44b2fd637a4578c70227944bbd8a14e1cba3b9ad5dd961b27489dbee7
|
|
4
|
+
data.tar.gz: c24b97bae8680e3e4146b6dbd4f6b67fec10ef3501777a9e280636e2782c91bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b7bc0d7cc6b2a6fac98e5b6c8924753dcfb7904ff00845c3aebe7d3e3c0a156c66a75f64f76944e2d3a31077c1af4c268585a95f958a6224dfdb116a24bb347
|
|
7
|
+
data.tar.gz: 3892b4103b6ff06156c44ccfb17e506e1165e65751ab08e76b9d43f622b196476b6a2aa1c5712c7adf82c64c0f367b39cc05cc209757b49f3e4e8fb2b6a11fa2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -7,6 +7,7 @@ Also check out:
|
|
|
7
7
|
- [TorchVision](https://github.com/ankane/torchvision-ruby) for computer vision tasks
|
|
8
8
|
- [TorchText](https://github.com/ankane/torchtext-ruby) for text and NLP tasks
|
|
9
9
|
- [TorchAudio](https://github.com/ankane/torchaudio-ruby) for audio tasks
|
|
10
|
+
- [TorchCodec](https://github.com/ankane/torchcodec-ruby) for audio and video encoding
|
|
10
11
|
- [TorchRec](https://github.com/ankane/torchrec-ruby) for recommendation systems
|
|
11
12
|
- [TorchData](https://github.com/ankane/torchdata-ruby) for data loading
|
|
12
13
|
|
|
@@ -22,7 +23,7 @@ As well as:
|
|
|
22
23
|
First, [download LibTorch](https://pytorch.org/get-started/locally/). For Mac arm64, use:
|
|
23
24
|
|
|
24
25
|
```sh
|
|
25
|
-
curl -L https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.
|
|
26
|
+
curl -L https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.12.0.zip > libtorch.zip
|
|
26
27
|
unzip -q libtorch.zip
|
|
27
28
|
```
|
|
28
29
|
|
|
@@ -418,6 +419,7 @@ Here’s the list of compatible versions.
|
|
|
418
419
|
|
|
419
420
|
Torch.rb | LibTorch
|
|
420
421
|
--- | ---
|
|
422
|
+
0.24.x | 2.12.x
|
|
421
423
|
0.23.x | 2.10.x
|
|
422
424
|
0.22.x | 2.9.x
|
|
423
425
|
0.21.x | 2.8.x
|
|
@@ -41,22 +41,18 @@ def skip_functions(functions)
|
|
|
41
41
|
# not supported yet
|
|
42
42
|
f.func.include?("Dimname") ||
|
|
43
43
|
f.func.include?("ConstQuantizerPtr") ||
|
|
44
|
-
# TODO fix
|
|
44
|
+
# TODO fix
|
|
45
45
|
f.base_name == "histogramdd" ||
|
|
46
46
|
f.base_name == "nested_tensor" ||
|
|
47
47
|
f.base_name == "split_copy" ||
|
|
48
48
|
f.base_name == "split_with_sizes_copy" ||
|
|
49
49
|
f.base_name == "unbind_copy" ||
|
|
50
|
-
# TODO fix LibTorch 1.13 changes
|
|
51
50
|
f.base_name == "native_channel_shuffle" ||
|
|
52
|
-
# TODO fix LibTorch 2.1 changes
|
|
53
51
|
f.base_name == "sym_size" ||
|
|
54
52
|
f.base_name == "sym_numel" ||
|
|
55
53
|
f.base_name == "sym_storage_offset" ||
|
|
56
54
|
f.base_name == "sym_stride" ||
|
|
57
|
-
# TODO fix LibTorch 2.6 changes
|
|
58
55
|
f.base_name == "rrelu_with_noise" ||
|
|
59
|
-
# TODO fix LibTorch 2.9 changes
|
|
60
56
|
f.base_name == "sym_is_contiguous" ||
|
|
61
57
|
f.base_name == "fbgemm_linear_fp16_weight" ||
|
|
62
58
|
f.base_name == "fbgemm_linear_fp16_weight_fp32_activation"
|
|
@@ -255,7 +251,6 @@ def group_overloads(functions, type)
|
|
|
255
251
|
end
|
|
256
252
|
|
|
257
253
|
def sort_functions(functions)
|
|
258
|
-
# TODO
|
|
259
254
|
functions.sort_by { |f| f["out"] ? 1 : 0 }
|
|
260
255
|
end
|
|
261
256
|
|