https://github.com/nihui/vkpeak
A tool which profiles Vulkan devices to find their peak capacities
https://github.com/nihui/vkpeak
Last synced: over 1 year ago
JSON representation
A tool which profiles Vulkan devices to find their peak capacities
- Host: GitHub
- URL: https://github.com/nihui/vkpeak
- Owner: nihui
- License: mit
- Created: 2021-04-24T12:23:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-22T12:03:45.000Z (almost 2 years ago)
- Last Synced: 2025-03-15T04:04:59.791Z (over 1 year ago)
- Language: C++
- Size: 30.3 KB
- Stars: 114
- Watchers: 9
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vkpeak

A synthetic benchmarking tool to measure peak capabilities of vulkan devices. It only measures the peak metrics that can be achieved using vector operations and does not represent a real-world use case.
## [Download](https://github.com/nihui/vkpeak/releases)
Download Windows/Linux/MacOS Executable for Intel/AMD/Nvidia GPU
**https://github.com/nihui/vkpeak/releases**
## Usages
```shell
vkpeak.exe 0
```
The only parameter 0 is the device id.
If you encounter a crash or error, try upgrading your GPU driver:
- Intel: https://downloadcenter.intel.com/product/80939/Graphics-Drivers
- AMD: https://www.amd.com/en/support
- NVIDIA: https://www.nvidia.com/Download/index.aspx
## Build from Source
1. Download and setup the Vulkan SDK from https://vulkan.lunarg.com/
- For Linux distributions, you can either get the essential build requirements from package manager
```shell
dnf install vulkan-headers vulkan-loader-devel
```
```shell
apt-get install libvulkan-dev
```
```shell
pacman -S vulkan-headers vulkan-icd-loader
```
2. Clone this project with all submodules
```shell
git clone https://github.com/nihui/vkpeak.git
cd vkpeak
git submodule update --init --recursive
```
3. Build with CMake
- You can pass -DUSE_STATIC_MOLTENVK=ON option to avoid linking the vulkan loader library on MacOS
```shell
mkdir build
cd build
cmake ..
cmake --build . -j 4
```
## Sample
```
[nihui@nihui-pc build]$ ./vkpeak 0
device = GeForce RTX 2070
fp32-scalar = 8536.18 GFLOPS
fp32-vec4 = 8473.82 GFLOPS
fp16-scalar = 8405.30 GFLOPS
fp16-vec4 = 16261.30 GFLOPS
fp64-scalar = 262.86 GFLOPS
fp64-vec4 = 262.86 GFLOPS
int32-scalar = 8363.63 GIOPS
int32-vec4 = 8313.07 GIOPS
int16-scalar = 5518.05 GIOPS
int16-vec4 = 7138.91 GIOPS
```
```
nihui@nihui-macbook-air vkpeak-20210424-macos % ./vkpeak 0
device = Apple M1
fp32-scalar = 2093.55 GFLOPS
fp32-vec4 = 2369.02 GFLOPS
fp16-scalar = 2195.79 GFLOPS
fp16-vec4 = 2513.04 GFLOPS
fp64-scalar = 0.00 GFLOPS
fp64-vec4 = 0.00 GFLOPS
int32-scalar = 653.38 GIOPS
int32-vec4 = 649.56 GIOPS
int16-scalar = 653.42 GIOPS
int16-vec4 = 652.94 GIOPS
```
## Other Open-Source Code Used
- https://github.com/Tencent/ncnn for fast neural network inference on ALL PLATFORMS