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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4c3936a55fd47a8898d3e678aabc81c158f2f39a89c08af0b36695700bf2043
4
- data.tar.gz: a68179c7d7bab7547ac3be1d2369abbd5c3c632954996ca2f7fdd089f815edf7
3
+ metadata.gz: 618b3c09305777402177e8bc3d536053434b1c94e5294035a8b4a78e645b3873
4
+ data.tar.gz: 910ac373619cb43887826d6277bc075b88311abd5dcc2be92bc6e9e15a35971d
5
5
  SHA512:
6
- metadata.gz: 97551aa27f154cade530e58b4ae92286cd18e432acc99646495a197c89fb719cc991b0399aacaf383a2de04e340c04a9e177c44a0169fce91e19435463df4753
7
- data.tar.gz: 8a5a5decf900a4d93aa56eb5e5b3848d5386be8bbc3657c10c201ef321cf0082c6521700378a5e96f795c09882b5b72498d8fed3931153b6e1f7557630f55547
6
+ metadata.gz: af100f347769a268f7b45779fd9531f631e341bb0af4c999b1fba075b5d1aedae2d736eff048d9926c005b56e1ae35582a946b71db0cba5e62d83e938c315814
7
+ data.tar.gz: 67803295ac4642c4cd32e66e9f3fcdeaaa33a37ae675693236c0561c4dfb4d6d405db6277ab156b0f31415058333ecd2aa06b3788f895a7836fc277b4d3fc084
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.11.2 (2022-09-25)
2
+
3
+ - Improved LibTorch detection for Homebrew on Mac ARM and Linux
4
+
1
5
  ## 0.11.1 (2022-07-06)
2
6
 
3
7
  - Fixed error with `stft` method
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 ||= "/usr/local/include"
23
- lib ||= "/usr/local/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
@@ -1,3 +1,3 @@
1
1
  module Torch
2
- VERSION = "0.11.1"
2
+ VERSION = "0.11.2"
3
3
  end
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.1
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-07-06 00:00:00.000000000 Z
11
+ date: 2022-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice