wonnx
wonnx copied to clipboard
Validation error spew on Vulkan
The shaders created by wonnx apparently run into naga/wgpu bugs that cause a lot of validation errors on Vulkan:
[2023-04-18T00:42:44Z ERROR wgpu_hal::vulkan::instance] VALIDATION [UNASSIGNED-CoreValidation-Shader-InconsistentSpirv (0x6bbb14)]
Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x7f1894544910, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-OpTypeRuntimeArray-04680] Vulkan, OpTypeStruct containing an OpTypeRuntimeArray must be decorated with Block or BufferBlock.
%ArrayVector = OpTypeStruct %_runtimearr_Vec4
[2023-04-18T00:42:44Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x7f1894544910, name: ?)
[2023-04-18T00:42:44Z ERROR wgpu_hal::vulkan::instance] VALIDATION [UNASSIGNED-CoreValidation-Shader-InconsistentSpirv (0x6bbb14)]
Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x7f1894544910, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-OpTypeRuntimeArray-04680] Vulkan, OpTypeStruct containing an OpTypeRuntimeArray must be decorated with Block or BufferBlock.
%ArrayVector = OpTypeStruct %_runtimearr_Vec4
[2023-04-18T00:42:44Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x7f1894544910, name: ?)
Not really caused by wonnx, but virtually every shader it creates causes an error like this, so I figured I'd document the issue here so people know about it.
You might try upgrading wgpu - maybe that fixes it. We are using an old version (can't update just yet because of an issue with wgpu on the web - see https://github.com/webonnx/wonnx/pull/140, but I guess wgpu@master should work with the minor changes in the PR applied).
Could you test again with v0.5.0?
Same error happens on v0.5.0
Filed https://github.com/gfx-rs/naga/issues/2322 upstream