Skip to content

Commit

Permalink
enable VK_KHR_cooperative_matrix (#4823)
Browse files Browse the repository at this point in the history
* enable VK_KHR_cooperative_matrix
* add khr cm shader
* update glslang
* print matrix info
  • Loading branch information
nihui authored Jul 27, 2023
1 parent 07b8400 commit c45c01c
Show file tree
Hide file tree
Showing 28 changed files with 4,580 additions and 1,076 deletions.
20 changes: 10 additions & 10 deletions .ci/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: swiftshader-install
cacheKey: swiftshader-linux-install-20230420
cacheKey: swiftshader-linux-install-20230420-1

- name: checkout-swiftshader
if: steps.cache-swiftshader.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: lavapipe-install
cacheKey: lavapipe-linux-install-20211127-3
cacheKey: lavapipe-linux-install-20211127-4

- name: checkout-lavapipe
if: steps.cache-lavapipe.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -280,7 +280,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-arm-install-20220831
cacheKey: qemu-arm-install-20220831-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -386,7 +386,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-aarch64-install-20220831
cacheKey: qemu-aarch64-install-20220831-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -473,7 +473,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-mipsel-install-20220831
cacheKey: qemu-mipsel-install-20220831-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -552,7 +552,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-mips64el-install-20220831
cacheKey: qemu-mips64el-install-20220831-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -631,7 +631,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-riscv64-install-20230624
cacheKey: qemu-riscv64-install-20230624-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -716,7 +716,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-riscv64-install-20230624
cacheKey: qemu-riscv64-install-20230624-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -751,7 +751,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: rv64gcv-install
cacheKey: rv64gcv-linux-install-20221029
cacheKey: rv64gcv-linux-install-20221029-1

- name: checkout-riscv-gnu-toolchain
if: steps.cache-rv64gcv.outputs.cacheHit != 'true'
Expand Down Expand Up @@ -861,7 +861,7 @@ jobs:
uses: cache@1.*
with:
cachePaths: qemu-install
cacheKey: qemu-loongarch64-install-20230524
cacheKey: qemu-loongarch64-install-20230524-1

- name: checkout-qemu
if: steps.cache-qemu.outputs.cacheHit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion glslang
Submodule glslang updated 265 files
193 changes: 161 additions & 32 deletions src/gpu.cpp

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ extern int support_VK_EXT_validation_flags;
extern int support_VK_KHR_android_surface;
#endif // __ANDROID_API__ >= 26

// VK_KHR_cooperative_matrix
extern PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR;

// VK_KHR_external_memory_capabilities
extern PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR;

Expand Down Expand Up @@ -176,13 +179,16 @@ class NCNN_EXPORT GpuInfo
// cooperative matrix feature
bool support_cooperative_matrix() const;
bool support_cooperative_matrix_16_8_8() const;
bool support_cooperative_matrix_16_8_16() const;
bool support_cooperative_matrix_16_16_16() const;

// extension capability
int support_VK_KHR_8bit_storage() const;
int support_VK_KHR_16bit_storage() const;
int support_VK_KHR_bind_memory2() const;
int support_VK_KHR_buffer_device_address() const;
int support_VK_KHR_create_renderpass2() const;
int support_VK_KHR_cooperative_matrix() const;
int support_VK_KHR_dedicated_allocation() const;
int support_VK_KHR_descriptor_update_template() const;
int support_VK_KHR_external_memory() const;
Expand Down
Loading

0 comments on commit c45c01c

Please sign in to comment.