Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Special mathematical functions implemented in GPU hardware

I learnt today that in NVIDIA GPUs there are in the vertex unit special hardware functions for calculating linear interpolation in a 3D regular grid. I wonder if there are more of this kind and more important, if people really use them when they do GPGPU to accelerate codes

like image 830
Open the way Avatar asked Nov 05 '22 20:11

Open the way


1 Answers

There are a number of functions that are implemented in hardware. The term you're looking for are "CUDA intrinsic functions." The linear interpolation is handled by textures, which is something similar.

See here: http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf

The intrinsic functions are typically spelled with leading double underscores, like __sin, or enabled globally with the --use_fast_math nvcc option.

And yes, they're actually used quite often. :) They are slightly more inaccurate from a numerical perspective, so passing the results of one intrinsic into another repeatedly can have unacceptable error, depending on your use case. Testing is key.

like image 172
Eli Stevens Avatar answered Nov 09 '22 16:11

Eli Stevens