Please update the implementation of the get_tflops function in benchmark/test_blas_perf.py under the benchmark directory. The function should be fully implemented to calculate TFLOPS accurately for the following operations:
addmm
mm
mv
bmm
Requirements
The get_tflops function should handle inputs for 2D, 3D, and 4D tensor scenarios.
Ensure compatibility with the listed operations to provide a consistent TFLOPS calculation across different input dimensions and types.
The feature, motivation and pitch
Description
Please update the implementation of the
get_tflops
function inbenchmark/test_blas_perf.py
under thebenchmark
directory. The function should be fully implemented to calculate TFLOPS accurately for the following operations:addmm
mm
mv
bmm
Requirements
get_tflops
function should handle inputs for 2D, 3D, and 4D tensor scenarios.Alternatives
No response