All Projects → ROCmSoftwarePlatform → MIOpenGEMM

ROCmSoftwarePlatform / MIOpenGEMM

Licence: MIT license
rocmsoftwareplatform.github.io/miopengemm/doc/html/

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language

MIOpenGEMM

An OpenCL general matrix multiplication (GEMM) API and kernel generator. More information is available on the wiki.

Prerequisites

Configure with cmake

First create a build directory:

mkdir build; cd build;

Next configure cmake; if OpenCL is installed in one of the standard locations,

cmake ..

otherwise manually set OpenCL cmake variables, either in CMakeCache.txt or

cmake -DOPENCL_LIBRARIES=<opencl-library-path> -DOPENCL_INCLUDE_DIRS<opencl-headers-path> ..

By default the install location is set to '/opt/rocm', this can be set by using CMAKE_INSTALL_PREFIX:

cmake -DCMAKE_INSTALL_PREFIX=<miopen-installed-path> ..

Build the library

The library can be built, from the build directory

make miopengemm

And can be installed by using the 'install' target

make install

Use the library

MIOpenGEMM provides an OpenCL GEMM API in gemm.hpp, which should be included in your C++ source file

#include <miopengemm/gemm.hpp>

The key function is

template <typename T>
MIOpenGEMM::GemmStatus xgemm(...)

which provides the same functionality as clBLAS' clblasSgemm and clblasDgemm. Currently only T=float and T=double are supported. More information on xgemm can be found on the wiki here.

To obtain just OpenCL kernel strings without executing GEMM, one can use miogemm.hpp , as done by MIOpen.

Run the test

Currently there is 1 basic test, which can be run with

make smallgeometrytests
./tests/smallgeometrytests 

or

make check

Build the examples

All examples can be built with

make examples

or individually by name, for example

make find

The examples are described on the the wiki here.

Build the documentation

HTML and PDF documentation can be built using:

make doc

This will build a local searchable web site inside the ./MIOpenGEMM/doc/html folder and a PDF document inside the ./MIOpenGEMM/doc/pdf folder.

Documentation is generated using Doxygen and should be installed separately.

HTML and PDFs are generated using Sphinx and Breathe, with the ReadTheDocs theme.

Requirements for both Sphinx, Breathe, and the ReadTheDocs theme can be filled for these in the MIOpenGEMM/doc folder:

pip install -r ./requirements.txt

Depending on your setup sudo may be required for the pip install.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].