Forums - Half support on Adreno Vulkan crashing

4 posts / 0 new
Last post
Half support on Adreno Vulkan crashing
alec
Join Date: 27 Sep 21
Posts: 3
Posted: Mon, 2021-09-27 17:58

We are compiling our shaders with explicit float16_t use via the VK_KHR_shader_float16_int8 extension.  We don't find or enable VK_KHR_16bit_storage, and it seems odd that this extension is missing on the Android 11 device. 

My Redmi Note 8 w/Adreno 610 doesn't provide either of these extensions.  It's running Android 10.  This runs #define half float

My Redmi Note 10 Pro w/Adreno 618 only provides VK_KHR_shader_float16_int8.  It's running Android 11.  This runs #define half float16_t

My Goggle Pixel 3a has similar issues w/Adreno615 and also only provides VK_KHR_shader_float16_int8.  It's running Android 11.   This runs #define half float16_t

https://vulkan.gpuinfo.org/displayreport.php?id=10427#properties_extensions

So I've run these shaders through Mali and Vulkan1.1 and validation and they are fine and generate half ops in the spv assembly finally.  When we try to run the float16_t shaders on Adreno 618, then I get the following log messages:

I AdrenoVK-0: Shader compilation failed for shaderType: 1
I AdrenoVK-0: Info log: Assertion failed: false && "Unknown floating point rounding mode"
 

As far as I can see the vertex shader this is failing on has no half usage.  It may have some mediump which translates to "Relaxed Precision" being taggged on the variables.   But we haven't started using half in this vertex shader.   This seems like a bad driver bug, and others have reported this error online in compute and fragment shaders.   

After searching the web for similar error messags, I think type 1 in this case is a fragment shader now. But that has very little other than half use and similar convert ops to those below.

 

  • Up0
  • Down0
alec
Join Date: 27 Sep 21
Posts: 3
Posted: Tue, 2021-09-28 10:43
The only thing I can find in the unreadable Spir-v assembly are these OpConvertFToS which default to RTZ.   Do we have to enable RTZ on Andreno via the vulkan extension to get this to run?  Specifically all the fields in the VK_KHR_shader_float_controls extension.
 
      %255 = OpLoad %v4float %a_material0
        %257 = OpVectorTimesScalar %v4float %255 %float_256
        %259 = OpConvertFToS %v4int %257                    <- assumes RTZ
        %261 = OpAccessChain %_ptr_Uniform_float %__0 %int_4
        %262 = OpLoad %float %261
        %263 = OpConvertFToS %int %262                          <- assumes RTZ
 
 
  • Up0
  • Down0
alec
Join Date: 27 Sep 21
Posts: 3
Posted: Tue, 2021-09-28 12:35

Requesting the values on float controls, I'm not sure know how any spri-v is supposed to run on this device.   These commands are generated and are valid for every other platforms.  This seems to indicate that support for RTZ and RTE is not present.

fp16 - RTZ 0 RTE 0, fp32 - RTZ 0 RTE 0

In fact, on printing out all the values, they all seem to be false.   Why is this extension even provided?

Also with the missing 16bit_storage extension, can we not assume use of float16_t in inputOutput16, uniforms, etc.   This is a big difference from other Android GPUs.

  • Up0
  • Down0
sriharia
Join Date: 1 Jun 18
Posts: 2
Posted: Wed, 2021-09-29 13:20

Hello Alec,

i am adreno vulkan driver lead. Could you please send me reproducable steps (apk or shader) to me. Feel free to email [email protected]

Thanks,

Srihari

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.