halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

[vulkan] local_laplacian_filter generates too many descriptor sets #8296

Open derek-gerstmann opened 2 weeks ago

derek-gerstmann commented 2 weeks ago
./VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ./local_laplacian/local_laplacian_process ./local_laplacian/rgb.png 8 1 1 10 out.png
VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286(ERROR / SPEC): msgNum: 1418532464 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286 ] Object 0: handle = 0x14b03f418, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x548d1670 | vkCreatePipelineLayout(): setLayoutCount (23) exceeds physical device maxBoundDescriptorSets limit (8). The Vulkan spec states: setLayoutCount must be less than or equal to VkPhysicalDeviceLimits::maxBoundDescriptorSets (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286)
    Objects: 1
        [0] 0x14b03f418, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03018(ERROR / SPEC): msgNum: -181011681 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03018 ] Object 0: handle = 0x14b03f418, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf535fb1f | vkCreatePipelineLayout(): max per-stage storage buffer bindings count (70) exceeds device maxPerStageDescriptorStorageBuffers limit (31). The Vulkan spec states: The total number of descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT bit set with a descriptorType of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorStorageBuffers (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-VkPipelineLayoutCreateInfo-descriptorType-03018)
    Objects: 1
        [0] 0x14b03f418, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03024(ERROR / SPEC): msgNum: -349439268 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03024 ] Object 0: handle = 0x14b03f418, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xeb2bfadc | vkCreatePipelineLayout(): max per-stage storage buffer bindings count (70) exceeds device maxPerStageDescriptorUpdateAfterBindStorageBuffers limit (31). The Vulkan spec states: The total number of descriptors with a descriptorType of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceDescriptorIndexingProperties::maxPerStageDescriptorUpdateAfterBindStorageBuffers (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-VkPipelineLayoutCreateInfo-descriptorType-03024)
    Objects: 1
        [0] 0x14b03f418, type: 3, name: NULL
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed (Error code 3):
program_source:818:92: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
kernel void _kernel_f7_s0_v1_v1_block_id_y(constant k11_args_struct& k11_args_var [[buffer(31)]], device k11_buffer_block1& k11_f7 [[buffer(32)]], device k11_buffer_block2& k11_f6 [[buffer(33)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
                                                                                           ^
program_source:818:141: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
kernel void _kernel_f7_s0_v1_v1_block_id_y(constant k11_args_struct& k11_args_var [[buffer(31)]], device k11_buffer_block1& k11_f7 [[buffer(32)]], device k11_buffer_block2& k11_f6 [[buffer(33)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
                                                                                                                                            ^
program_source:818:190: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
kernel void _kernel_f7_s0_v1_v1_block_id_y(constant k11_args_struct& k11_args_var [[buffer(31)]], device k11_buffer_block1& k11_f7 [[buffer(32)]], device k11_buffer_block2& k11_f6 [[buffer(33)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
                                                                                                                                                                                             ^