Partager via


ScriptIntrinsicBLAS.BNNM Method

Definition

8-bit GEMM-like operation for neural networks: C = A * Transpose(B) Calculations are done in 1.

[Android.Runtime.Register("BNNM", "(Landroid/renderscript/Allocation;ILandroid/renderscript/Allocation;ILandroid/renderscript/Allocation;II)V", "", ApiSince=23)]
public void BNNM (Android.Renderscripts.Allocation? A, int a_offset, Android.Renderscripts.Allocation? B, int b_offset, Android.Renderscripts.Allocation? C, int c_offset, int c_mult);
[<Android.Runtime.Register("BNNM", "(Landroid/renderscript/Allocation;ILandroid/renderscript/Allocation;ILandroid/renderscript/Allocation;II)V", "", ApiSince=23)>]
member this.BNNM : Android.Renderscripts.Allocation * int * Android.Renderscripts.Allocation * int * Android.Renderscripts.Allocation * int * int -> unit

Parameters

A
Allocation

The input allocation contains matrix A, supported elements type Element#U8.

a_offset
Int32

The offset for all values in matrix A, e.g A[i,j] = A[i,j] - a_offset. Value should be from 0 to 255.

B
Allocation

The input allocation contains matrix B, supported elements type Element#U8.

b_offset
Int32

The offset for all values in matrix B, e.g B[i,j] = B[i,j] - b_offset. Value should be from 0 to 255.

C
Allocation

The input allocation contains matrix C, supported elements type Element#U8.

c_offset
Int32

The offset for all values in matrix C.

c_mult
Int32

The multiplier for all values in matrix C, e.g C[i,j] = (C[i,j] + c_offset) * c_mult.

Attributes

Remarks

8-bit GEMM-like operation for neural networks: C = A * Transpose(B) Calculations are done in 1.10.21 fixed-point format for the final output, just before there's a shift down to drop the fractional parts. The output values are gated to 0 to 255 to fit in a byte, but the 10-bit format gives some headroom to avoid wrapping around on small overflows.

Java documentation for android.renderscript.ScriptIntrinsicBLAS.BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to