numo-openblas 0.4.9 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/ext/numo/openblas/extconf.rb +16 -12
- 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: 6dfc35bf1fad150b133c35591cac8b5ef8733bfb6330d6a1e831a662d2fc77e9
|
4
|
+
data.tar.gz: 3baa6585182c222cfe278a78644934da4528ec66443ed868b2b3d23f290dd934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f449515f70a29ca8859af3889ec0e63e8a9958fb7916ab31b2809b3e5b8ce566b4d8cd692a38cc2c80ae185bc439f2189aeaab2a96f40eae2bae11bdd987ee6f
|
7
|
+
data.tar.gz: 05370f4f78a8734183fc3e7d1ce9cc58a3e8d543be102826924ffaa03775702fcaafd9c38331b40a7c307640c5c22c3644cad9f590b5edaef095ff33c73f781c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 0.4.11
|
2
|
+
- Change the version of OpenBLAS to be downloaded to 0.3.24.
|
3
|
+
|
4
|
+
## 0.4.10
|
5
|
+
- Refactor extconf.rb with RuboCop.
|
6
|
+
- Change to check download file with MD5.
|
7
|
+
- Add vendor/bin directory to OpenBLAS load directory for Windows ([#2](https://github.com/yoshoku/numo-openblas/pull/2)).
|
8
|
+
- Since the author does not have a Windows PC, the operation cannot be confirmed.
|
9
|
+
|
1
10
|
## 0.4.9
|
2
11
|
- Change the version of OpenBLAS to be downloaded to 0.3.23.
|
3
12
|
|
@@ -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'
|
@@ -8,17 +8,17 @@ require 'open-uri'
|
|
8
8
|
require 'open3'
|
9
9
|
require 'rubygems/package'
|
10
10
|
|
11
|
-
OPENBLAS_VER = '0.3.
|
12
|
-
OPENBLAS_KEY = '
|
11
|
+
OPENBLAS_VER = '0.3.24'
|
12
|
+
OPENBLAS_KEY = '23599a30e4ce887590957d94896789c8'
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04
|
11
|
+
date: 2023-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-linalg
|