How to measure the performance of a GPU?

Is there a sample program to test the GFLOPS stated by NVIDIA in the NVIDIA-SAMPLES
For example, take a Tesla T4 card. It is stated on the NVIDIA web page that it gives nearly 8.1 TFLOPS.
How do I test the stated performance? I know how to write a program but I want to check with you first.

The usual method would be to use CUBLAS and run an appropriately-sized Sgemm or Dgemm call, and time the duration of that call.

The matrixMulCUBLAS sample code will give you a general pattern, although it would probably need to be modified to observe peak performance.

Thank you. So there is no readily available program to measure the FLOPS of a GPU in the NVIDIA Samples.