https://github.com/yoshoku/numo-blis
Numo::BLIS builds and uses BLIS as a background library for Numo::Linalg
https://github.com/yoshoku/numo-blis
blas blis gem machine-learning numo ruby
Last synced: 6 months ago
JSON representation
Numo::BLIS builds and uses BLIS as a background library for Numo::Linalg
- Host: GitHub
- URL: https://github.com/yoshoku/numo-blis
- Owner: yoshoku
- License: bsd-3-clause
- Created: 2021-07-17T05:10:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-19T14:36:35.000Z (6 months ago)
- Last Synced: 2025-04-19T18:09:40.120Z (6 months ago)
- Topics: blas, blis, gem, machine-learning, numo, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/numo-blis
- Size: 96.7 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Numo::BLIS
[](https://github.com/yoshoku/numo-blis/actions/workflows/build.yml)
[](https://badge.fury.io/rb/numo-blis)
[](https://github.com/yoshoku/numo-blis/blob/main/LICENSE.txt)Numo::BLIS downloads and builds [BLIS](https://github.com/flame/blis) during installation and
uses that as a background library for [Numo::Linalg](https://github.com/ruby-numo/numo-linalg).## Installation
Building LAPACK with BLIS requires cmake and Fortran compiler.
macOS:
$ brew install gcc gfortran cmake
Ubuntu:
$ sudo apt-get install gcc gfortran cmake
Add this line to your application's Gemfile:
```ruby
gem 'numo-blis'
```And then execute:
$ bundle install
Or install it yourself as:
$ gem install numo-blis
Note:
Currently, when installing on Apple M1 mac, Numo::BLIS gives `generic` to the CPU type option of BLIS.
It is possible that BLIS is not fully optimized and has low performance.## Usage
Numo::BLIS loads Numo::NArray and Numo::Linalg using BLIS as a background library.
You can use Numo::NArray and Numo::Linalg just by loading Numo::BLIS.```ruby
require 'numo/blis'x = Numo::DFloat.new(5, 2).rand
c = x.transpose.dot(x)
eig_val, eig_vec = Numo::Linalg.eigh(c)
```Moreover, the versions of background libraries are defined by constants.
```ruby
> Numo::BLIS::BLIS_VERSION
=> "0.8.1"
> Numo::BLIS::LAPACK_VERSION
=> "3.10.0"
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-blis.
This project is intended to be a safe, welcoming space for collaboration,
and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.## License
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause)