Skip to content

UCHINO-Yuki/GEMMul8_MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEMMul8 for MATLAB

Overview

This repository provides a MATLAB interface for GEMMul8 v1.1.0, enabling its use on MATLAB running on Windows.

Note

Legacy cuBLAS INT8 GEMM implementations may not be supported on newer-generation GPUs.
Installation of the latest CUDA Toolkit is therefore recommended.

Building the Library on Mac/Linux

  1. To get the source code, execute:

    git clone https://github.com/UCHINO-Yuki/GEMMul8_MATLAB
  2. To build the static library of GEMMul8, execute:

    cd GEMMul8_MATLAB
    make -j8
  3. In the MATLAB Command Window, execute:

    oz2_compile

Building the Library on Windows

  1. Open Gemmul8_MATLAB/build.bat with a text editor such as Notepad
    (do not double-click, as this will execute the script).

    Modify the following lines according to your environment:

    set CUDA_PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1"
    set GPU_ARCH=89

    Target GPU architecture (GPU_ARCH) can be found from CUDA GPU Compute Capability.

  2. Open the standard Windows Command Prompt.

  3. In the Command Prompt, run the following command (replace 2022 with the installed Visual Studio version if necessary):

    "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
  4. Change the directory to the Gemmul8_MATLAB folder.

    cd PATH_TO_Gemmul8_MATLAB
  5. To build the static library of GEMMul8, execute:

    build.bat
  6. In the MATLAB Command Window, execute:

    oz2_compile

Running Tests

  1. In the MATLAB Command Window, execute:

    oz2_test

This will run basic functionality tests to verify correct integration of GEMMul8 with MATLAB.

Notations

The generated MATLAB function introduce non-negligible runtime overhead, including dynamic allocation and deallocation of working memory, as well as additional costs inherent to MATLAB execution and the MEX interface. Consequently, their performance is inferior to that of the native GEMMul8 library. For performance-critical workloads, direct utilization of the original GEMMul8 implementation is strongly recommended.

About

A MATLAB interface for GEMMul8 that enables high-performance GPU matrix multiplication on Windows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages