numo-openblas 0.4.9 → 0.4.10
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 +6 -0
- data/ext/numo/openblas/extconf.rb +15 -11
- data/lib/numo/openblas/version.rb +1 -1
- data/lib/numo/openblas.rb +4 -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: 3727204342344f16515ccd3e4bddd8f145df8a672ee1b900a58298e416b3daae
|
4
|
+
data.tar.gz: 6579a0317755f177e119077d76491b9c87a7483f29beee08d480a1c13c6fb3bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5f8576676fb7739e0b9a652fbb47c4896957999e57fc4b83547422b4f43c93de49a07c03d79c333ddba1037a09d289ec74e2ff63248c8df6d6215c23745f3bb
|
7
|
+
data.tar.gz: d7b8052022a948d5cd9a8f3a808da131d0db2ab1606d01fe3e385ac4e2ef02329a8b4acd764cf6fb2b9735b8b9f6ce4f906c2b0709a84081bb13563e143fd934
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.4.10
|
2
|
+
- Refactor extconf.rb with RuboCop.
|
3
|
+
- Change to check download file with MD5.
|
4
|
+
- Add vendor/bin directory to OpenBLAS load directory for Windows ([#2](https://github.com/yoshoku/numo-openblas/pull/2)).
|
5
|
+
- Since the author does not have a Windows PC, the operation cannot be confirmed.
|
6
|
+
|
1
7
|
## 0.4.9
|
2
8
|
- Change the version of OpenBLAS to be downloaded to 0.3.23.
|
3
9
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'digest/
|
3
|
+
require 'digest/md5'
|
4
4
|
require 'etc'
|
5
5
|
require 'fileutils'
|
6
6
|
require 'mkmf'
|
@@ -9,16 +9,16 @@ require 'open3'
|
|
9
9
|
require 'rubygems/package'
|
10
10
|
|
11
11
|
OPENBLAS_VER = '0.3.23'
|
12
|
-
OPENBLAS_KEY = '
|
12
|
+
OPENBLAS_KEY = '115634b39007de71eb7e75cf7591dfb2'
|
13
13
|
OPENBLAS_URI = "https://github.com/xianyi/OpenBLAS/archive/v#{OPENBLAS_VER}.tar.gz"
|
14
|
-
OPENBLAS_DIR = File.expand_path(__dir__
|
14
|
+
OPENBLAS_DIR = File.expand_path("#{__dir__}/../../../vendor")
|
15
15
|
|
16
16
|
unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
17
|
-
URI.
|
18
|
-
File.open("#{OPENBLAS_DIR}/tmp/openblas.tgz", 'wb') { |sf| sf.write(rf.read) }
|
19
|
-
end
|
17
|
+
URI.parse(OPENBLAS_URI).open { |f| File.binwrite("#{OPENBLAS_DIR}/tmp/openblas.tgz", f.read) }
|
20
18
|
|
21
|
-
|
19
|
+
if Digest::MD5.file("#{OPENBLAS_DIR}/tmp/openblas.tgz").to_s != OPENBLAS_KEY
|
20
|
+
abort('MD5 digest of downloaded file does not match.')
|
21
|
+
end
|
22
22
|
|
23
23
|
Gem::Package::TarReader.new(Zlib::GzipReader.open("#{OPENBLAS_DIR}/tmp/openblas.tgz")) do |tar|
|
24
24
|
tar.each do |entry|
|
@@ -28,7 +28,7 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
|
28
28
|
next if filename == File.dirname(filename)
|
29
29
|
|
30
30
|
FileUtils.mkdir_p("#{OPENBLAS_DIR}/tmp/#{File.dirname(entry.full_name)}")
|
31
|
-
File.
|
31
|
+
File.binwrite(filename, entry.read)
|
32
32
|
File.chmod(entry.header.mode, filename)
|
33
33
|
end
|
34
34
|
end
|
@@ -36,11 +36,15 @@ unless File.exist?("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
|
36
36
|
Dir.chdir("#{OPENBLAS_DIR}/tmp/OpenBLAS-#{OPENBLAS_VER}") do
|
37
37
|
mkstdout, _mkstderr, mkstatus = Open3.capture3("make -j#{Etc.nprocessors}")
|
38
38
|
File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'w') { |f| f.puts(mkstdout) }
|
39
|
-
|
39
|
+
unless mkstatus.success?
|
40
|
+
abort("Failed to build OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log")
|
41
|
+
end
|
40
42
|
|
41
43
|
insstdout, _insstderr, insstatus = Open3.capture3("make install PREFIX=#{OPENBLAS_DIR}")
|
42
44
|
File.open("#{OPENBLAS_DIR}/tmp/openblas.log", 'a') { |f| f.puts(insstdout) }
|
43
|
-
|
45
|
+
unless insstatus.success?
|
46
|
+
abort("Failed to install OpenBLAS. Check the openblas.log file for more details: #{OPENBLAS_DIR}/tmp/openblas.log")
|
47
|
+
end
|
44
48
|
|
45
49
|
FileUtils.touch("#{OPENBLAS_DIR}/installed_#{OPENBLAS_VER}")
|
46
50
|
end
|
data/lib/numo/openblas.rb
CHANGED
@@ -5,4 +5,7 @@ require 'numo/linalg/linalg'
|
|
5
5
|
require 'numo/openblas/version'
|
6
6
|
require 'numo/openblas/openblas'
|
7
7
|
|
8
|
-
Numo::Linalg::Loader.load_openblas(
|
8
|
+
Numo::Linalg::Loader.load_openblas(
|
9
|
+
File.expand_path("#{__dir__}/../../vendor/lib/"),
|
10
|
+
File.expand_path("#{__dir__}/../../vendor/bin/")
|
11
|
+
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-openblas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-linalg
|