{"id":18408812,"url":"https://github.com/codeplaysoftware/portfft","last_synced_at":"2025-04-07T09:33:21.741Z","repository":{"id":208801503,"uuid":"614951200","full_name":"codeplaysoftware/portFFT","owner":"codeplaysoftware","description":"portFFT is a library implementing Fast Fourier Transforms using SYCL","archived":false,"fork":false,"pushed_at":"2024-09-09T12:49:53.000Z","size":1877,"stargazers_count":14,"open_issues_count":3,"forks_count":6,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-09-09T15:26:39.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeplaysoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-03-16T16:37:34.000Z","updated_at":"2024-09-09T12:49:57.000Z","dependencies_parsed_at":"2024-08-14T01:10:15.957Z","dependency_job_id":"f2d9d49c-5852-45c2-8cf4-84e5b55b5c0a","html_url":"https://github.com/codeplaysoftware/portFFT","commit_stats":null,"previous_names":["codeplaysoftware/portfft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FportFFT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FportFFT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FportFFT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FportFFT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeplaysoftware","download_url":"https://codeload.github.com/codeplaysoftware/portFFT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223275899,"owners_count":17118250,"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-06T03:21:34.973Z","updated_at":"2025-04-07T09:33:21.735Z","avatar_url":"https://github.com/codeplaysoftware.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# portFFT\n\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codeplaysoftware/portFFT/badge)](https://scorecard.dev/viewer/?uri=github.com/codeplaysoftware/portFFT)\n\n## Introduction\n\nportFFT is a library implementing Fast Fourier Transforms using SYCL and C++.\nportFFT is in early stages of development and will support more options and optimizations in the future.\n\n## Pre-requisites\n\n* [DPC++] oneAPI release 2024.0\n  * Nightly releases from [intel/llvm] should work but are not tested\n  * Other SYCL implementations are not tested\n* [Level Zero] drivers\n  * OpenCL drivers are not supported\n* CMake 3.20+\n* For tests and verifying benchmarks:\n  * Python\n  * Numpy\n\n## Getting Started\n\n### Building with CMake\n\nClone portFFT and run the following commands from the cloned repository.\n\nBuild using DPC++ 2024.0 as:\n\n```shell\nsource /path/to/intel/oneapi/compiler/2024.0/env/vars.sh\ncmake -Bbuild -DCMAKE_CXX_COMPILER=icpx -DPORTFFT_BUILD_TESTS=ON -DPORTFFT_BUILD_BENCHMARKS=ON\ncmake --build build\n```\n\nBuild using DPC++ nightlies as (SPIR64 target only):\n\n```shell\ncmake -Bbuild -DCMAKE_CXX_COMPILER=/path/to/dpcpp/bin/clang++ -DCMAKE_C_COMPILER=/path/to/dpcpp/bin/clang -DPORTFFT_BUILD_TESTS=ON -DPORTFFT_BUILD_BENCHMARKS=ON\ncmake --build build\n```\n\nTo compile AOT for a specific device, specify the target device with:\n\n```shell\n-DPORTFFT_DEVICE_TRIPLE=\u003cT\u003e[T1,..,Tn]\n```\n\nThe list of available targets can be found on [DPC++ compiler documentation page].\nSome AOT targets do not support double precision.\nTo disable the building of tests and benchmarks using double precision, set `-DPORTFFT_ENABLE_DOUBLE_BUILDS=OFF`.\n\nportFFT currently requires to set the subgroup size at compile time. Multiple sizes can be set and the first one that is supported by the device will be used. Depending on the device used you may need to set the subgroup size with `-DPORTFFT_SUBGROUP_SIZES=\u003ccomma separated list of sizes\u003e`. By default only size 32 is used.\nIf you run into the exception with the message `None of the compiled subgroup sizes are supported by the device!` then `DPORTFFT_SUBGROUP_SIZES` must be set to a different value(s) supported by the device.\n\n### Tests\n\nTests are build if the CMake setting `PORTFFT_BUILD_TESTS` is set to `ON`.\nAdditionally, this enables `clang-tidy` checks if `PORTFFT_CLANG_TIDY` is at its default value of `ON`.\nAutomatic fixing of some `clang-tidy` warnings can be enabled by setting `PORTFFT_CLANG_TIDY_AUTOFIX` to `ON`.\n\nRun the tests from the build folder with:\n\n```shell\nctest\n```\n\n### portFFT benchmarks\n\nRun pre-defined benchmarks from the build folder with:\n\n```shell\n./test/bench/bench_float\n```\n\nRun manual benchmarks from the build folder with for instance:\n\n```shell\n./test/bench/bench_manual_float d=cpx,n=5\n```\n\nUse the `--help` flag to print help message on the configuration syntax.\n\n## Supported configurations\n\nportFFT is still in early development. The supported configurations are:\n\n* complex-to-complex transforms\n* interleaved complex and split complex (restricted to one dimension) storage\n* single and double precisions\n* forward and backward directions\n* in-place and out-of-place transforms\n* USM and buffer containers\n* batched transforms\n* 1D transforms\n* multi-dimensional transforms with the following restrictions:\n  * default values for strides and distances\n  * size in each dimension must be supported by 1D transforms\n* Arbitrary forward and backward scales\n* Arbitrary forward and backward offsets\n* Arbitrary strides and distance where the problem size + auxilary data fits in the registers of a single subgroup.\n\nAny 1D arbitrarily large input size that fits in global memory is supported, with a restriction that large input sizes should not have large prime factors.\nThe largest prime factor depend on the device and the values set by `PORTFFT_REGISTERS_PER_WI` and `PORTFFT_SUBGROUP_SIZES`.\nFor instance with `PORTFFT_REGISTERS_PER_WI` set to `128` (resp. `256`) each work-item can hold a maximum of 27 (resp. 56) complex values, thus with `PORTFFT_SUBGROUP_SIZES` set to `32` the largest prime factor cannot exceed `27*32=864` (resp. `56*32=1792`).\nportFFT may allocate up to `2 * PORTFFT_MAX_CONCURRENT_KERNELS * input_size` scratch memory, depending on the configuration passed.\n\nAny batch size is supported as long as the input and output data fits in global memory.\n\nBy default the library assumes subgroup size of 32 is used. If that is not supported by the device it is running on, the subgroup size can be set using `PORTFFT_SUBGROUP_SIZES`.\n\nConfigurations that attempt to read from the same memory address from two separate batches of a transform are not supported.\n\n## Known issues\n\n* portFFT relies on SYCL specialization constants which have some limitations currently:\n  * Some optimizations seem to be missing at JIT compile time. We are working to improve this.\n  * Specialization constants are currently emulated on Nvidia and AMD backends which prevents some optimizations.\n\nOverall the work of optimizing portFFT is still in progress.\n\n## Troubleshooting\n\nThe library should compile without error on our supported platforms.\nIf you run into trouble, or think you have found a bug, we have a support\nforum available through the [developer website], or create an issue on GitHub.\n\n## Maintainers\n\nThis library is maintained by [Codeplay Software Ltd].\nIf you have any problems, please contact sycl@codeplay.com.\n\n## Contributions\n\nThis library is licensed under the Apache 2.0 license. Patches are very\nwelcome! If you have an idea for a new feature or a fix, please get in\ncontact.\n\n[DPC++]: https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top.html\n[intel/llvm]: https://github.com/intel/llvm/releases\n[Level Zero]: https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2025-0/intel-oneapi-level-zero-switch.html\n[developer website]: https://developer.codeplay.com\n[Codeplay Software Ltd]: https://www.codeplay.com\n[DPC++ compiler documentation page]: https://intel.github.io/llvm-docs/UsersManual.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplaysoftware%2Fportfft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeplaysoftware%2Fportfft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplaysoftware%2Fportfft/lists"}