Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please answer about my question. #5

Open
dalxung opened this issue Jul 14, 2023 · 1 comment
Open

please answer about my question. #5

dalxung opened this issue Jul 14, 2023 · 1 comment

Comments

@dalxung
Copy link

dalxung commented Jul 14, 2023

my question address
#4 (comment)

Is format conversion being done with a each transcendental function custom fixed-point format via the transcendental function 'adjust processing scope for some operations'?

example,

    sin(x), cos(x)   fuction 

c0 is 0bxxxxx...xx = +0.xxxxx...xx = sign 1bit, the remainder is the fractional part
c1 is 0bxxxxxx...xx = +x.xxxxx...xx = sign 1bit, integer 1 bit, the remainder is the fractional part
c2 is 0bxxxxxx...xx = -0.0xxxx...xx = sign 1bit, with a leading 0 and the remainder is the fractional part

Software used to generate coefficients ( maplesoft's maple software )
In SFU, each coefficient LUT ( c0, c1, c2 ), which is a coefficient array, is created with this bit range ( m = 6 ) , so the number of array elements is 64 ( 2^6 ).
The data type sizes (bit array size) of c0, c1, and c2 to be stored are t, p, and q, respectively.

Quadratic polynomial c0, c1, c2 coefficient values
sin(x), cos(x), rsqrt(x), log2(x), exp2(x), 1/x and sqrt(x)

                            c0              c1              c2
    1/x                    +0.1xxxx...xx,  -0.xxxxx...xx,  +0.xxxxx...xx
    sqrt(x)                +1.0xxxx...xx,  +0.01xxx...xx,  -0.000xx...xx
    rsqrt(x)               +0.1xxxx...xx,  -0.0xxxx...xx,  +0.0xxxx...xx
    exp2(x)                +1.xxxxx...xx,  +x.xxxxx...xx,  +0.0xxxx..xx
    log2(x)                +0.xxxxx...xx,  +x.xxxxx...xx,  -0.xxxxx...xx
    sin(x), cos(x)         +0.xxxxx...xx,  +x.xxxxx...xx,  -0.0xxxx...xx

is it?
A second-order approximation polynomial for a transcendental function has the form
f(x) = C0(XH) + C1(XH)*XL + C2(XH)*XL^2
The size of the 32-bit floating-point realm is n bits, and the input argument x to function f is:
upper part of m-bit XH and
Consists of (divided) into lower XL of (n-m) bits
Generate coefficients C0, C1, C2 using fractional field XH (use XH as select index into coefficient array C0, C1, C2 LUT when transcendental function is called)

Is format conversion being done with a each transcendental function custom fixed-point format via the transcendental function 'adjust processing scope for some operations'?

The range of values for the coefficients C0, C1, and C2 are different for each of the six function operations.
Coefficient calculation via Maple software
for example
Analysis of 3 coefficients based on the maximum and minimum values of 6 function operations
To use the same ROM size
29 bits for C0 coefficients (3.26 two's complement format: 1-bit sign, 2-bit integer bits, 26-bit fraction bits)
20 bits for C1 coefficients (4.16 format: 1 bit signed, 3 bits integer, 16 bits decimal)
C2 adopts 14 bits (6.8 format: 1 bit sign, 5 bits integer, 8 bits decimal).
The six operations are sin(x), cos(x), rsqrt(x), log2(x), exp2(x), 1/x, and sqrt(x).

of c0, c1, c2 for each transcendental function applied to the FlexGrip.
Please explain the number of sign bits, integer bits, and fractional bits.

For example,
Please explain how the bit string, which is the number at a specific index of the lut array of cos c0, c1, c2, changes when converted to a float 32-bit value through the corresponding format above.

How to check the output value after setting the transcendental function type and input value?
6 page ( SFU_User_Manual V2.pdf ) - https://zenodo.org/record/3934441#.Ye7dNPgo8uU

How to edit modelsim script .tcl documentation to check eg cos(x) input?

@dalxung
Copy link
Author

dalxung commented Jul 22, 2023

Commercial GPUs use log2, not ln2. Why is the source ln2? The ln2 function cannot output the log2 value. Commercial GPUs use log2 - https://developer.download.nvidia.com/cg/log2.html , log2 source is not ln2 - https://github.com/Jerc007/Open-GPGPU-FlexGrip-/tree/master/FlexGripPlus_4.4/RTL/SMP/Pipeline/Execution/SFU/Quadratic_Interpolator/Single_LUTS , It is marked as log2 in SFU_User_Manual V2.pdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant