Floating point 16 fails addition assignment operation windows PC

21 views
Skip to first unread message

Yuvraj Thakur

unread,
Jan 25, 2024, 7:39:09 AMJan 25
to Dawn Graphics
Hello again :)
 
With the release of shader-fp16 I was experimenting with FP16 and writing a convolution filter operation. Inside the shader I created an accumulator of F16
`let accum = vec4<f16>(0,0,0,0)` 
I save the computed values inside this accumulator. 
`accum[0] += dot(vec4_f16_a, vec4_f16_b);` 

This works perfectly fine on Mac M1 but throws shader validation error on my Windows with i7 integrated graphics.
Because it works on Mac but not Windows I feel this probably an API related issue.

You can find a striped down jsfiddle demo: https://jsfiddle.net/3bh95npa/
 Error:
  • "Something bad happened: DXC compile failed with: hlsl.hlsl:1:16: warning: possible effect annotation ignored - effect syntax is deprecated [-Weffects-syntax] void set_vector&lt;float16_t, 4&gt;(inout vector&lt;float16_t, 4&gt; vec, int idx, float16_t val) { ^ hlsl.hlsl:1:6: error: variable has incomplete type 'const void' void set_vector&lt;float16_t, 4&gt;(inout vector&lt;float16_t, 4&gt; vec, int idx, float16_t val) { ^ hlsl.hlsl:12:2: error: expected ';' after top level declarator } ^ ; - While calling [Device].CreateComputePipeline([ComputePipelineDescriptor \&quot;test\&quot;]). "

Yuvraj Thakur

unread,
Jan 25, 2024, 7:44:00 AMJan 25
to Dawn Graphics
Forgot to mention on windows I tested it on chromium: Version 123.0.6263.0 (Official Build) canary (64-bit)

Corentin Wallez

unread,
Jan 25, 2024, 8:30:20 AMJan 25
to Yuvraj Thakur, Dawn Graphics
Hello,

Thanks for the report, for bugs like this it is better to report them directly on crbug.com/dawn or crbug.com/tint :) I filed an issue for this here: https://bugs.chromium.org/p/tint/issues/detail?id=2146

Cheers,

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/9e469909-86ca-4abe-89b1-668d480b220dn%40googlegroups.com.

Yuvraj Thakur

unread,
Jan 25, 2024, 8:32:19 AMJan 25
to Corentin Wallez, Dawn Graphics
Thank you so much. I will keep this in mind for any future issues. 
Reply all
Reply to author
Forward
0 new messages