{"id":20433762,"url":"https://github.com/intelpython/fft_benchmark","last_synced_at":"2025-07-21T04:32:25.831Z","repository":{"id":66109077,"uuid":"96474424","full_name":"IntelPython/fft_benchmark","owner":"IntelPython","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T18:45:08.000Z","size":104,"stargazers_count":3,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-15T05:35:37.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntelPython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-06T21:43:39.000Z","updated_at":"2025-03-25T14:06:26.000Z","dependencies_parsed_at":"2024-01-29T21:27:10.695Z","dependency_job_id":"0daea2e9-1686-413a-92a9-33b36d9a1bc3","html_url":"https://github.com/IntelPython/fft_benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IntelPython/fft_benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelPython%2Ffft_benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelPython%2Ffft_benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelPython%2Ffft_benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelPython%2Ffft_benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntelPython","download_url":"https://codeload.github.com/IntelPython/fft_benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelPython%2Ffft_benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266240823,"owners_count":23898062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:20:58.856Z","updated_at":"2025-07-21T04:32:25.799Z","avatar_url":"https://github.com/IntelPython.png","language":"C","readme":"# FFT benchmarks for NumPy\\* and SciPy\\*\n\nThis FFF benchmarking framework is useful to measure FFT performance of different NumPy and SciPy versions and vendors. \nIn addition to Python implementation, it is also possible to benchmark native code (MKL DFTI) implementations of these benchmarks with similar command-line interfaces.\n\n## Python benchmarks\n\nThe following example create benchmarking environment for NumPy and SciPy FFT available from intel channel in conda:\n\n```bash\nconda create -n fft_benchmark -c https://software.repos.intel.com/python/conda/ -c conda-forge numpy scipy\nconda activate fft_benchmark\n```\n\nTo run the FFT benchmark framework in Python, type:\n\n```bash\npython fft_bench.py [-h] [args] size\n```\n\nThe framework perform initial warmup call to respective FFT API, and then performs 24 (default) timings\nfor 16 (default) repetitions of FFT computations in the loop. These 24\nmeasurements are aggregated to report minimum, median and maximum timings,\nwhich are printed to STDOUT.\n\nOther printed lines which start with 'TAG: ' are printed for information purposes.\n\n### Examples\n\nBenchmark a 2D out-of-place FFT of a `complex128` array of size `(10000, 10000)`:\n\n```bash\npython fft_bench.py 10000x10000\n```\n\nBenchmark a 1D in-place FFT of a `float32` array of size `100000000`, print\nonly 5 measurements, only compute the first half of the conjugate-even\nDFT coefficients, and allow the FFT backend to only use one thread:\n\n```bash\npython fft_bench.py -P -r -t 1 -d float32 -o 5 100000000\n```\n\nBenchmark a 3D in-place FFT of a `complex64` array of size `1001x203x3005`,\nprinting only 5 measurements, each of which average over 24 inner loop\ncomputations:\n\n```bash\npython fft_bench.py -P -d complex64 -o 5 -i 24 1001x203x3005\n```\n\n## Native benchmarks\n\n### Compiling on Linux\n- Source compiler and MKL, then run `make`.\n\n```bash\nsource /path_to_oneapi/compiler/latest/env/vars.sh\nsource /path_to_oneapi/mkl/latest/env/vars.sh\nmake\n```\n\n- Run with `./fft_bench [args] size`.\n\n### Compiling on Windows\n- Source compiler and MKL, then run `win_compile_all.bat`.\n\n  ```\n  \u003e \"C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\env\\vars.bat\"\n  \u003e \"C:\\Program Files (x86)\\Intel\\oneAPI\\mkl\\latest\\env\\vars.bat\"\n  \u003e win_compile_all.bat\n  ```\n\n- Run with `fft_bench.exe [args] size`. Note that long options are not supported on\n  Windows. Use short options instead.\n\n### Examples\n\nBenchmark a 2D out-of-place FFT of a `complex128` array of size `(10000, 10000)`:\n\n```bash\n./fft_bench 10000x10000\n```\n\nBenchmark a 1D in-place FFT of a `float32` array of size `100000000`, print\nonly 5 measurements, only compute the first half of the conjugate-even\nDFT coefficients, allow the FFT backend to only use one thread, and cache\nthe DFTI descriptor between inner loop runs (similar behavior to `mkl_fft` for\nsingle dimensional FFTs).\n\n```bash\n./fft_bench -P -c -r -t 1 -d float32 -o 5 100000000\n```\n\nBenchmark a 3D in-place FFT of a `complex64` array of size `1001x203x3005`,\nprinting only 5 measurements, each of which average over 24 inner loop\ncomputations:\n\n```bash\n./fft_bench -P -d complex64 -o 5 -i 24 1001x203x3005\n```\n\n### Usage\n\n```\nusage: ./fft_bench [args] size\nBenchmark FFT using Intel(R) MKL DFTI.\n\nFFT problem arguments:\n  -t, --threads=THREADS    use THREADS threads for FFT execution\n                           (default: use MKL's default)\n  -d, --dtype=DTYPE        use DTYPE as the FFT domain. For a list of\n                           understood dtypes, use '-d help'.\n                           (default: complex128)\n  -r, --rfft               do not copy superfluous harmonics when FFT\n                           output is even-conjugate, i.e. for real inputs\n  -P, --in-place           allow overwriting the input buffer with the\n                           FFT outputs\n  -c, --cached             use the same DFTI descriptor for the same\n                           outer loop, i.e. \"cache\" the descriptor\n\nTiming arguments:\n  -i, --inner-loops=IL     time the benchmark IL times for each printed\n                           measurement. Copies are not included in the\n                           measurements. (default: 16)\n  -o, --outer-loops=OL     print OL measurements. (default: 5)\n\nOutput arguments:\n  -p, --prefix=PREFIX      output PREFIX as the first value in outputs\n                           (default: 'Native-C')\n  -H, --no-header          do not output CSV header. This can be useful\n                           if running multiple benchmarks back-to-back.\n  -h, --help               print this message and exit\n\nThe size argument specifies the input matrix size as a tuple of positive\ndecimal integers, delimited by any non-digit. For example, both\n(101, 203, 305) and 101x203x305 denote the same 3D FFT.\n```\n\n## See also\n\"[Accelerating Scientific Python with Intel\nOptimizations](https://proceedings.scipy.org/articles/shinma-7f4c6e7-00f)\"\nby Oleksandr Pavlyk, Denis Nagorny, Andres Guzman-Ballen, Anton Malakhov, Hai\nLiu, Ehsan Totoni, Todd A. Anderson, Sergey Maidanov. Proceedings of the 16th\nPython in Science Conference (SciPy 2017), July 10 - July 16, Austin, Texas\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelpython%2Ffft_benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintelpython%2Ffft_benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelpython%2Ffft_benchmark/lists"}