Since the final data of the sonar calculation is typical int values, if carefully adopted, the half-precision calculation could boost the refresh rate of the sonar image. This is a note for later retry.
Issues on Half-precision CUDA calculation implementation
Usage of a half-precision library is very limited to certain types of graphics cards.
It's sometimes not supported at all or partially supported.
If partially supported, the multiplication (__hmul()) and division(__hdiv()) function cannot be used. Only addition and subtraction are allowed. Also, some mathematical functions are not usable.
Calculation time boost in the sonar_calculation CUDA kernel function does not affect the final refresh rate.
The bottleneck of the sonar calculation is the ray summation (reduction). It's what CPUs are good at compared to GPUs. Effective reduction of parallelization is very complex. Some considerations are already included in the code.
Benchmark results
at workstation (i9-9900K 3.6GHz, Nvidia GeForce RTX 2080Ti)
Since the final data of the sonar calculation is typical
int
values, if carefully adopted, the half-precision calculation could boost the refresh rate of the sonar image. This is a note for later retry.Issues on Half-precision CUDA calculation implementation
__hmul()
) and division(__hdiv()
) function cannot be used. Only addition and subtraction are allowed. Also, some mathematical functions are not usable.sonar_calculation
CUDA kernel function does not affect the final refresh rate.Benchmark results
Rate [Hz]
Time [s]
60 m Range
114 Rays
60 m Range
11 Rays
10 m Range
11 Rays