GithubHelp home page GithubHelp logo

jeffbolznv / vk_cooperative_matrix_perf Goto Github PK

View Code? Open in Web Editor NEW
56.0 10.0 8.0 97 KB

Sample benchmark demonstrating the VK_KHR_cooperative_matrix extension

License: MIT License

CMake 3.19% Batchfile 5.09% C++ 91.72%

vk_cooperative_matrix_perf's Introduction

vk_cooperative_matrix_perf is a sample/benchmark demonstrating performance of using the VK_KHR_cooperative_matrix Vulkan extension, and the associated GL_KHR_cooperative_matrix GLSL extension.

The benchmark queries the supported matrix multiply sizes and precisions from the Vulkan implementation, and runs a couple different shaders at various tiles sizes and reports the performance in teraflops.

Running this application requires an NVIDIA Turing or newer GPU, and a recent driver that supports the VK_KHR_cooperative_matrix extension.

Modifying and rebuilding the shaders requires a glslangValidator.exe with GL_KHR_cooperative_matrix support. This is included Vulkan SDK version 1.3.261.0 and newer.

vk_cooperative_matrix_perf's People

Contributors

jeffbolznv avatar

Stargazers

Jianhui Dai avatar Jacob Goodale avatar  avatar Ziegfeld Z avatar Adrian Kreskowski avatar Pedro Boechat avatar  avatar Lin Hsu avatar RobClu avatar Matthias Fauconneau avatar Chris Hebert avatar  avatar grayson avatar  avatar Turo Lamminen avatar Adrien avatar  avatar  avatar Allan MacKinnon avatar Oscar Barenys avatar Pratham-D avatar Marcos Scheeren avatar  avatar Mateusz Radomski avatar Zeekim avatar Jan Bielak avatar czc avatar Monish Ramadoss avatar  avatar Simon Liimatainen avatar Aleksey avatar Yuxi Liu avatar Yoh avatar Wenbo Chen avatar Dhawal S avatar fishlegs avatar NULL avatar  avatar am1234kolt avatar  avatar abdul dakkak avatar lishen avatar corleonechensiyu avatar  avatar yangfengzzz avatar Rustam Khusainov avatar Eunbin Bak avatar Juuso Haavisto avatar Claudia Doppioslash avatar  avatar Anton Heryanto Hasan avatar Adam Gibson avatar Miraculous Ladybugreport avatar Andréa Machizaud avatar 曹明伟,Mingwei Cao avatar Christoph Kubisch avatar

Watchers

Allan MacKinnon avatar Claudia Doppioslash avatar Chris Hebert avatar Matthias Fauconneau avatar Zhuo Zhang avatar  avatar Piers Daniell avatar Simon Liimatainen avatar Harris avatar  avatar

vk_cooperative_matrix_perf's Issues

integer_cooperative_matrix does not work

I was trying to benchmark the performance of an NVIDIA TITAN RTX , nvidia driver version 440.100 (on Ubuntu 18.04.01)
with the code in this repo.

the function:
vkGetPhysicalDeviceCooperativeMatrixPropertiesNV
doesn't seem to store in the cooperativeMatrixProperties vector any integer element
for the AType field of the VkCooperativeMatrixPropertiesNV struct.

More specifically, if after context initialization and before any benchmark I write:

printf("What I am going to do \n");
for (uint32_t tt = 0; tt < TT_COUNT; ++tt) {
for (uint32_t i = 0; i < numCooperativeMatrixProperties; ++i) {
VkCooperativeMatrixPropertiesNV *cooperativeMatrixProps = &cooperativeMatrixProperties[i];
printf("\ncooperativeMatrixProps = %dx%dx%d A = %s B = %s C = %s D = %s scope = %s\n",
cooperativeMatrixProps->MSize,
cooperativeMatrixProps->NSize,
cooperativeMatrixProps->KSize,
componentTypeInfo[cooperativeMatrixProps->AType].typeName,
componentTypeInfo[cooperativeMatrixProps->BType].typeName,
componentTypeInfo[cooperativeMatrixProps->CType].typeName,
componentTypeInfo[cooperativeMatrixProps->DType].typeName,
scopeString[cooperativeMatrixProps->scope]);
}
}

I obtain the following output:

What I am going to do

cooperativeMatrixProps = 16x8x16 A = float16_t B = float16_t C = float16_t D = float16_t scope = subgroup
cooperativeMatrixProps = 16x8x8 A = float16_t B = float16_t C = float16_t D = float16_t scope = subgroup
cooperativeMatrixProps = 16x8x16 A = float16_t B = float16_t C = float32_t D = float32_t scope = subgroup
cooperativeMatrixProps = 16x8x8 A = float16_t B = float16_t C = float32_t D = float32_t scope = subgroup
cooperativeMatrixProps = 16x8x16 A = float16_t B = float16_t C = float16_t D = float16_t scope = subgroup
cooperativeMatrixProps = 16x8x8 A = float16_t B = float16_t C = float16_t D = float16_t scope = subgroup
cooperativeMatrixProps = 16x8x16 A = float16_t B = float16_t C = float32_t D = float32_t scope = subgroup
cooperativeMatrixProps = 16x8x8 A = float16_t B = float16_t C = float32_t D = float32_t scope = subgroup

No integer types for A.
Benchmarks are only performed on float types.
I did not modified nor recompiled the shaders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.