Skip to content

Commit

Permalink
[Vulkan] Fix coop matrix property initialization (iree-org#17023)
Browse files Browse the repository at this point in the history
This fixes crashes on new AMDVLK.
  • Loading branch information
kuhar authored Apr 11, 2024
1 parent 94971b4 commit fbd31b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/src/iree/hal/drivers/vulkan/vulkan_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,10 @@ static iree_status_t iree_hal_vulkan_get_device_properties(
VkCooperativeMatrixPropertiesKHR* properties =
(VkCooperativeMatrixPropertiesKHR*)iree_alloca(
count * sizeof(VkCooperativeMatrixPropertiesKHR));
memset(properties, 0, count * sizeof(VkCooperativeMatrixPropertiesKHR));
for (uint32_t i = 0; i < count; ++i) {
properties[i].sType = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR;
}
IREE_RETURN_IF_ERROR(VK_RESULT_TO_STATUS(
instance_syms->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(
physical_device, &count, properties)));
Expand Down

0 comments on commit fbd31b0

Please sign in to comment.