Skip to content

Latest commit

 

History

History
56 lines (53 loc) · 1.94 KB

README.md

File metadata and controls

56 lines (53 loc) · 1.94 KB

Level Zero General Matrix Multiplication

Overview

This sample application performs general matrix multiplication using Level Zero GPU device, so it can be used as a target for Level Zero profiling and tracing tools.

Level Zero Matrix Multiplication (matrix size: 1024 x 1024, repeats 4 times)
Target device: Intel(R) Gen9
Matrix multiplication time: 0.0719728 sec
Results are CORRECT with accuracy: 4.90573e-06
Matrix multiplication time: 0.072521 sec
Results are CORRECT with accuracy: 4.90573e-06
Matrix multiplication time: 0.073427 sec
Results are CORRECT with accuracy: 4.90573e-06
Matrix multiplication time: 0.0723689 sec
Results are CORRECT with accuracy: 4.90573e-06
Total execution time: 0.357162 sec

To run application on target device and sub-device one can specify PTI_DEVICE_ID and PTI_SUB_DEVICE_ID environment variables.

Supported OS

  • Linux
  • Windows (under development)

Prerequisites

Build and Run

Linux

Run the following commands to build the sample:

cd <pti>/samples/ze_gemm
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Use this command line to run the application:

./ze_gemm [matrix_size] [repeats_count]

Windows

Use Microsoft* Visual Studio x64 command prompt to run the following commands and build the sample:

cd <pti>\samples\ze_gemm
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=<level_zero_loader>\lib -DCMAKE_INCLUDE_PATH=<level_zero_loader>\include ..
nmake

Use this command line to run the application:

ze_gemm.exe [matrix_size] [repeats_count]