Project

numo-blis

0.0
No release in over a year
Numo::BLIS downloads and builds BLIS during installation and uses that as a background library for Numo::Linalg.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.4
 Project Readme

Numo::BLIS

Build Status Gem Version BSD 3-Clause License

Numo::BLIS downloads and builds BLIS during installation and uses that as a background library for 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:

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.

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.

> 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 code of conduct.

License

The gem is available as open source under the terms of the BSD-3-Clause License