torch-rb 0.11.1 → 0.11.2
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 +4 -0
- data/README.md +0 -14
- data/ext/torch/extconf.rb +12 -2
- data/lib/torch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 618b3c09305777402177e8bc3d536053434b1c94e5294035a8b4a78e645b3873
|
|
4
|
+
data.tar.gz: 910ac373619cb43887826d6277bc075b88311abd5dcc2be92bc6e9e15a35971d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af100f347769a268f7b45779fd9531f631e341bb0af4c999b1fba075b5d1aedae2d736eff048d9926c005b56e1ae35582a946b71db0cba5e62d83e938c315814
|
|
7
|
+
data.tar.gz: 67803295ac4642c4cd32e66e9f3fcdeaaa33a37ae675693236c0561c4dfb4d6d405db6277ab156b0f31415058333ecd2aa06b3788f895a7836fc277b4d3fc084
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -428,20 +428,6 @@ You can also use Homebrew.
|
|
|
428
428
|
brew install libtorch
|
|
429
429
|
```
|
|
430
430
|
|
|
431
|
-
For Mac ARM, run:
|
|
432
|
-
|
|
433
|
-
```sh
|
|
434
|
-
bundle config build.torch-rb --with-torch-dir=/opt/homebrew
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
And for Linux, run:
|
|
438
|
-
|
|
439
|
-
```sh
|
|
440
|
-
bundle config build.torch-rb --with-torch-dir=/home/linuxbrew/.linuxbrew
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
Then install the gem.
|
|
444
|
-
|
|
445
431
|
## Performance
|
|
446
432
|
|
|
447
433
|
Deep learning is significantly faster on a GPU. With Linux, install [CUDA](https://developer.nvidia.com/cuda-downloads) and [cuDNN](https://developer.nvidia.com/cudnn) and reinstall the gem.
|
data/ext/torch/extconf.rb
CHANGED
|
@@ -18,9 +18,19 @@ else
|
|
|
18
18
|
$CXXFLAGS += " -Wno-duplicated-cond -Wno-suggest-attribute=noreturn"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
paths = [
|
|
22
|
+
"/usr/local",
|
|
23
|
+
"/opt/homebrew",
|
|
24
|
+
"/home/linuxbrew/.linuxbrew"
|
|
25
|
+
]
|
|
26
|
+
|
|
21
27
|
inc, lib = dir_config("torch")
|
|
22
|
-
inc ||= "/
|
|
23
|
-
lib ||= "/
|
|
28
|
+
inc ||= paths.map { |v| "#{v}/include" }.find { |v| Dir.exist?("#{v}/torch") }
|
|
29
|
+
lib ||= paths.map { |v| "#{v}/lib" }.find { |v| Dir["#{v}/*torch_cpu*"].any? }
|
|
30
|
+
|
|
31
|
+
unless inc && lib
|
|
32
|
+
abort "LibTorch not found"
|
|
33
|
+
end
|
|
24
34
|
|
|
25
35
|
cuda_inc, cuda_lib = dir_config("cuda")
|
|
26
36
|
cuda_inc ||= "/usr/local/cuda/include"
|
data/lib/torch/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: torch-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Kane
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rice
|