halide / Halide

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

[vulkan] stencil_chain_filter generates too many descriptor sets #8297

Open derek-gerstmann opened 2 weeks ago

derek-gerstmann commented 2 weeks ago
./VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ./stencil_chain/stencil_chain_process ./stencil_chain/rgb.png 10 out.png            
VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286(ERROR / SPEC): msgNum: 1418532464 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-setLayoutCount-00286 ] Object 0: handle = 0x11f04dc18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x548d1670 | vkCreatePipelineLayout(): setLayoutCount (32) 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] 0x11f04dc18, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03017(ERROR / SPEC): msgNum: -1565019798 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03017 ] Object 0: handle = 0x11f04dc18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa2b7b16a | vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (32) exceeds device maxPerStageDescriptorUniformBuffers 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_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceLimits::maxPerStageDescriptorUniformBuffers (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-VkPipelineLayoutCreateInfo-descriptorType-03017)
    Objects: 1
        [0] 0x11f04dc18, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03018(ERROR / SPEC): msgNum: -181011681 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03018 ] Object 0: handle = 0x11f04dc18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf535fb1f | vkCreatePipelineLayout(): max per-stage storage buffer bindings count (64) 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] 0x11f04dc18, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03023(ERROR / SPEC): msgNum: -227882531 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03023 ] Object 0: handle = 0x11f04dc18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf26ac9dd | vkCreatePipelineLayout(): max per-stage uniform buffer bindings count (32) exceeds device maxPerStageDescriptorUpdateAfterBindUniformBuffers limit (31). The Vulkan spec states: The total number of descriptors with a descriptorType of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pSetLayouts must be less than or equal to VkPhysicalDeviceDescriptorIndexingProperties::maxPerStageDescriptorUpdateAfterBindUniformBuffers (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-VkPipelineLayoutCreateInfo-descriptorType-03023)
    Objects: 1
        [0] 0x11f04dc18, type: 3, name: NULL
VUID-VkPipelineLayoutCreateInfo-descriptorType-03024(ERROR / SPEC): msgNum: -349439268 - Validation Error: [ VUID-VkPipelineLayoutCreateInfo-descriptorType-03024 ] Object 0: handle = 0x11f04dc18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xeb2bfadc | vkCreatePipelineLayout(): max per-stage storage buffer bindings count (64) 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] 0x11f04dc18, type: 3, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
VUID-RuntimeSpirv-Workgroup-06530(ERROR / SPEC): msgNum: -1405964136 - Validation Error: [ VUID-RuntimeSpirv-Workgroup-06530 ] Object 0: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xac32b098 | Shader uses 65536 bytes of shared memory, more than allowed by physicalDeviceLimits::maxComputeSharedMemorySize (32768) The Vulkan spec states: The sum of size in bytes for variables and padding in the Workgroup storage class in the GLCompute {ExecutionModel} must be less than or equal to maxComputeSharedMemorySize (https://vulkan.lunarg.com/doc/view/1.3.231.1/mac/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-Workgroup-06530)
    Objects: 1
        [0] 0xfab64d0000000002, type: 15, name: NULL
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed (Error code 3):
program_source:630:151: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
kernel void _kernel_stage_10_s0_y_y_block_id_y(constant k11_args_struct& k11_args_var [[buffer(30)]], device k11_buffer_block1& k11_stage_10 [[buffer(31)]], device k11_buffer_block2& k11_stage_9 [[buffer(32)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
                                                                                                                                                      ^
program_source:630:205: error: 'buffer' attribute parameter is out of bounds: must be between 0 and 30
kernel void _kernel_stage_10_s0_y_y_block_id_y(constant k11_args_struct& k11_args_var [[buffer(30)]], device k11_buffer_block1& k11_stage_10 [[buffer(31)]], device k11_buffer_block2& k11_stage_9 [[buffer(32)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
abadams commented 2 weeks ago

There are a lot of vulkan issues open now. Should we turn off testing on the bots until you have time to work through them?

derek-gerstmann commented 2 weeks ago

There are a lot of vulkan issues open now. Should we turn off testing on the bots until you have time to work through them?

Yes, there's been too much drift with the validation layers and I'll need more time to fix all these issues.

Probably best to turn off the Vulkan testing so that no one else is blocked. We can re-enable them once I get through all the issues.