Skip to content

Lisp-Stat/mkl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MS-PL License LinkedIn


Logo

MKL

Intel Math Kernel Library bindings for Common Lisp
Explore the docs »

Report Bug · Request Feature · Reference Manual

Table of Contents

  1. About the Project
  2. Getting Started
  3. Systems
  4. Contributing
  5. License
  6. Contact

About the Project

MKL provides Common Lisp bindings for Intel's Math Kernel Library, offering access to performance-optimized mathematical functions.

Objectives

  • Direct MKL integration: Provide bindings to Intel MKL functions with minimal overhead and direct access to optimized mathematical operations.

  • Performance optimization: Enable Common Lisp applications to benefit from Intel MKL's hardware-specific optimizations and vectorized operations.

  • Vector mathematics: Implement efficient vector mathematical operations through the VML (Vector Math Library) component.

  • Library compatibility: Maintain compatibility with existing Common Lisp mathematical libraries and development workflows.

Built With

Getting Started

MKL requires Intel Math Kernel Library to be installed on your system before loading. The library provides bindings to MKL functions and does not include the MKL libraries themselves.

Prerequisites

MKL requires Intel Math Kernel Library shared libraries to be available on your system. You can install MKL through:

Ensure that the MKL libraries are accessible through your system's library search path or configure the library locations as described in the installation section.

Installation

Using Quicklisp

The recommended installation method is through Quicklisp. Load specific MKL subsystems as needed:

(ql:quickload :mkl/vml)    ; Vector Math Library
(ql:quickload :mkl/fft)    ; Fast Fourier Transform (if available)
(ql:quickload :mkl/dnn)    ; Deep Neural Networks (if available)

Note: Quicklisp distributions are not updated frequently. If MKL subsystems are not available through Quicklisp, use the manual installation method described below.

Manual Installation

To make the system accessible to ASDF (a build facility, similar to make in the C world), clone the repository in a directory ASDF knows about. By default the common-lisp directory in your home directory is known. Create this if it doesn't already exist and then:

  1. Clone the repository
cd ~/common-lisp && \
git clone https://github.com/lisp-stat/mkl.git
  1. Reset the ASDF source-registry to find the new system (from the REPL)
    (asdf:clear-source-registry)
  2. Load the desired MKL subsystems
    (asdf:load-system :mkl/vml)    ; Vector Math Library
    (asdf:load-system :mkl/fft)    ; Fast Fourier Transform (if available)
    (asdf:load-system :mkl/dnn)    ; Deep Neural Networks (if available)

If you have installed the slime ASDF extensions, you can invoke this with a comma (',') from the slime REPL.

Getting dependencies

To get the third party systems that MKL depends on, you can use a dependency manager, such as Quicklisp or CLPM Once installed, get the dependencies with either of:

(clpm-client:sync :sources "clpi") ;sources may vary
(ql:quickload :mkl/vml)  ; This will also install dependencies

You need do this only once. After obtaining the dependencies, you can load the subsystems with ASDF as described above without first syncing sources.

Systems

VML (Vector Math Library)

The VML system provides bindings to Intel MKL's Vector Math Library, which implements optimized mathematical functions for arrays and vectors. VML operations process multiple data elements in parallel, providing significant performance improvements over scalar implementations.

The VML system includes:

  • Vectorized mathematical functions (trigonometric, exponential, logarithmic, power functions)
  • Element-wise array operations
  • Configurable accuracy modes and error handling
  • Support for single and double precision floating-point data

Load the VML system with:

(asdf:load-system :mkl/vml)

or

(ql:quickload :mkl/vml)

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Please see CONTRIBUTING for details on the code of conduct, and the process for submitting pull requests.

License

Distributed under the MS-PL License. See LICENSE for more information.

Contact

Project Link: https://github.com/lisp-stat/mkl

About

Common lisp wrapper for Intel Math Kernel Library

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published