Skip to content

Clients

Fei Zheng edited this page Jun 13, 2024 · 25 revisions

Accuracy Tests

rocfft-test is the functional coverage test of rocFFT. As default, it goes through all enabled tests. One also could run rocfft-test manually with the options similar to rocfft-bench to verify specific case.

Source: https://github.com/ROCmSoftwarePlatform/rocFFT/tree/develop/clients/tests

CMake build option: BUILD_CLIENTS_TESTS from within the top-level source directory, or build it directly from within the tests directory by specifying an already installed rocFFT library with CMAKE_PREFIX_PATH.

Check running options: ./rocfft-test -h

Performance Tests

rocfft-bench

rofft-bench benchmarks on a single FFT problem with various configurations.

Source: https://github.com/ROCmSoftwarePlatform/rocFFT/blob/develop/clients/bench/bench.cpp

CMake build option: BUILD_CLIENTS_BENCH from within the top-level source directory, or build it directly from within the bench directory by specifying an already installed rocFFT library with CMAKE_PREFIX_PATH.

Check running options: ./rocfft-bench -h

dyna-rocfft-bench

dyna-rocfft-bench benchmarks on a single FFT problem as well. It provides advanced option to test one problem within single test binary but dynamic loading rocFFT libraries from different builds. And the execution of runs are randomized.

Source: https://github.com/ROCmSoftwarePlatform/rocFFT/blob/develop/clients/bench/dyna-bench.cpp

CMake build option: BUILD_CLIENTS_BENCH from within the top-level source directory, or build it directly from within the bench directory by specifying an already installed rocFFT library with CMAKE_PREFIX_PATH.

Check running options: ./dyna-rocfft-bench -h

perf test script

rocfft-perf is the tool to benchmark, plot, and generate performance report of rocFFT with a group of test suites. For each suite, It outputs median value of(time, gflops, roofline). It is based on rocfft-bench or dyna-rocfft-bench.

Source: https://github.com/ROCmSoftwarePlatform/rocFFT/tree/develop/scripts/perf

Check running options: ./rocfft-perf overview

Dependency: It requires python3, numpy, scipy, pandas, plotly, tex, asymptote. The setup could be:

  • python3 and packages:

    sudo apt-get install python3-numpy python3-scipy python3-pandas

  • tex:

    wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

    tar -xvf install-tl-unx.tar.gz

    cd install-tl-xxxxxxxx

    ./install-tl

    export PATH=${HOME}/tex/bin/x86_64-linux:${PATH}

  • asymptote

    sudo apt-get install texinfo

    wget https://cfhcable.dl.sourceforge.net/project/asymptote/2.61/asymptote-2.61.src.tgz

    tar -xvf asymptote-2.61.src.tgz

    cd asymptote-2.61

    ./configure --prefix=${HOME}/asy && make && make install

    export PATH=${HOME}/asy/bin:${PATH}

  • other plot/doc tools might be required

    pip install python-docx --user

    python3 -m pip install dataclasses

    python3 -m pip install plotly==5.1.0

    (plotly 5.1.0 is the minimal required version)

Examples

  • Test 2 builds of rocFFT with rocfft-bench:
    ./rocfft-perf run --bench ../build0/clients/staging/rocfft-bench --out ../working_dir/old
    ./rocfft-perf run --bench ../build1/clients/staging/rocfft-bench --out ../working_dir/new
    ./rocfft-perf post ../working_dir/doc ../working_dir/old ../working_dir/new
    ./rocfft-perf html ../working_dir/doc ../working_dir/old ../working_dir/new
  • Test 2 builds of rocFFT with dyna-rocfft-bench:
    ./rocfft-perf run --bench ../rocFFT/build/clients/staging/dyna-rocfft-bench --lib ../build0/library/src/librocfft.so --lib ../build1/library/src/librocfft.so --out ../working_dir/old --out ../working_dir/new/
    ./rocfft-perf post ../working_dir/doc ../working_dir/old ../working_dir/new
    ./rocfft-perf html ../working_dir/doc ../working_dir/old ../working_dir/new

Self Tests