Skip to content

Commit

Permalink
Rename SYCL-FFT to portFFT excluding cmake variables (#63)
Browse files Browse the repository at this point in the history
* Renames everything SYCL-FFT to portFFT
* Does not rename CMake variables
  * Consequently build scripts can be kept the same
* Update README for project name
  • Loading branch information
hjabird authored Jul 21, 2023
1 parent ebafeae commit 71862ae
Show file tree
Hide file tree
Showing 50 changed files with 321 additions and 322 deletions.
54 changes: 27 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# * Codeplay's SYCL-FFT
# * Codeplay's portFFT
# *
# * @filename CMakeLists.txt
# *
# **************************************************************************/

cmake_minimum_required(VERSION 3.16...3.26)
project(sycl-fft VERSION 0.1.0 LANGUAGES CXX)
project(portFFT VERSION 0.1.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -56,30 +56,30 @@ set(SYCLFFT_SRC_DIR
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:src>)

add_library(sycl_fft INTERFACE)
target_include_directories(sycl_fft INTERFACE
add_library(portfft INTERFACE)
target_include_directories(portfft INTERFACE
${SYCLFFT_INCLUDE_DIR}
${SYCLFFT_SRC_DIR}
)
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_TARGET_REGS_PER_WI=${SYCLFFT_TARGET_REGS_PER_WI})
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_SUBGROUP_SIZES=${SYCLFFT_SUBGROUP_SIZES})
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_TARGET_WI_LOAD=${SYCLFFT_TARGET_WI_LOAD})
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_SGS_IN_WG=${SYCLFFT_SGS_IN_WG})
target_compile_definitions(portfft INTERFACE PORTFFT_TARGET_REGS_PER_WI=${SYCLFFT_TARGET_REGS_PER_WI})
target_compile_definitions(portfft INTERFACE PORTFFT_SUBGROUP_SIZES=${SYCLFFT_SUBGROUP_SIZES})
target_compile_definitions(portfft INTERFACE PORTFFT_TARGET_WI_LOAD=${SYCLFFT_TARGET_WI_LOAD})
target_compile_definitions(portfft INTERFACE PORTFFT_SGS_IN_WG=${SYCLFFT_SGS_IN_WG})
if(${SYCLFFT_USE_SG_TRANSFERS})
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_USE_SG_TRANSFERS)
target_compile_definitions(portfft INTERFACE PORTFFT_USE_SG_TRANSFERS)
endif()
if(${SYCLFFT_SLOW_SG_SHUFFLES})
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_SLOW_SG_SHUFFLES=1)
target_compile_definitions(portfft INTERFACE PORTFFT_SLOW_SG_SHUFFLES=1)
else()
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_SLOW_SG_SHUFFLES=0)
target_compile_definitions(portfft INTERFACE PORTFFT_SLOW_SG_SHUFFLES=0)
endif()

target_compile_options(sycl_fft INTERFACE -fgpu-inline-threshold=1000000)
target_link_options(sycl_fft INTERFACE -fsycl-device-code-split=per_kernel)
target_compile_options(sycl_fft INTERFACE -fsycl-device-code-split=per_kernel)
target_compile_options(portfft INTERFACE -fgpu-inline-threshold=1000000)
target_link_options(portfft INTERFACE -fsycl-device-code-split=per_kernel)
target_compile_options(portfft INTERFACE -fsycl-device-code-split=per_kernel)

include(CMakePackageConfigHelpers)
set(version_file "${CMAKE_CURRENT_BINARY_DIR}/cmake/sycl_fft-version.cmake")
set(version_file "${CMAKE_CURRENT_BINARY_DIR}/cmake/portfft-version.cmake")
write_basic_package_version_file(${version_file}
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
Expand All @@ -91,11 +91,11 @@ if(SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES MATCHES "^[0-9]+(,[0-9]+)*$")
else()
message(FATAL_ERROR " Invalid SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES value: " ${SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES})
endif()
target_compile_definitions(sycl_fft INTERFACE SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES=${SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES})
target_compile_definitions(portfft INTERFACE PORTFFT_COOLEY_TUKEY_OPTIMIZED_SIZES=${SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES})

include(GNUInstallDirs)
install(TARGETS sycl_fft
EXPORT sycl_fft
install(TARGETS portfft
EXPORT portfft
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -106,24 +106,24 @@ install(
${SYCLFFT_INCLUDE_DIR}
${SYCLFFT_SRC_DIR}
DESTINATION ${CMAKE_INSTALL_PREFIX}
COMPONENT sycl_fft
COMPONENT portfft
FILES_MATCHING PATTERN "*.hpp"
)

install(FILES ${version_file} DESTINATION ${CMAKE_INSTALL_PREFIX})
install(EXPORT sycl_fft
install(EXPORT portfft
DESTINATION ${CMAKE_INSTALL_PREFIX}
NAMESPACE sycl_fft::
FILE sycl_fft-config.cmake
NAMESPACE portfft::
FILE portfft-config.cmake
)

export(EXPORT sycl_fft
NAMESPACE sycl_fft::
FILE sycl_fft-config.cmake
export(EXPORT portfft
NAMESPACE portfft::
FILE portfft-config.cmake
)

add_library(sycl_fft_warnings INTERFACE)
target_compile_options(sycl_fft_warnings INTERFACE -Wall -Wextra -Wshadow -Wconversion -Wpedantic)
add_library(portfft_warnings INTERFACE)
target_compile_options(portfft_warnings INTERFACE -Wall -Wextra -Wshadow -Wconversion -Wpedantic)

if(${SYCLFFT_BUILD_TESTS})
enable_testing()
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SYCL-FFT
# portFFT

## Introduction

SYCL-FFT is a library implementing Fast Fourier Transforms using SYCL and C++.
SYCL-FFT is in early stages of development and will support more options and optimizations in the future.
portFFT is a library implementing Fast Fourier Transforms using SYCL and C++.
portFFT is in early stages of development and will support more options and optimizations in the future.

## Pre-requisites

Expand All @@ -21,7 +21,7 @@ SYCL-FFT is in early stages of development and will support more options and opt

### Building with CMake

Clone SYCL-FFT and run the following commands from the cloned repository.
Clone portFFT and run the following commands from the cloned repository.

Build using DPC++ 2023.1.0 as:

Expand All @@ -48,7 +48,7 @@ The list of available targets can be found on [DPC++ compiler documentation page
Some AOT targets do not support double precision.
To disable the building of tests and benchmarks using double precision, set `-DSYCLFFT_ENABLE_DOUBLE_BUILDS=OFF`.

SYCL-FFT 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 `-DSYCLFFT_SUBGROUP_SIZES=<comma separated list of sizes>`. By default only size 32 is used.
portFFT 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 `-DSYCLFFT_SUBGROUP_SIZES=<comma separated list of sizes>`. By default only size 32 is used.
If you run into the exception with the message `None of the compiled subgroup sizes are supported by the device!` then `DSYCLFFT_SUBGROUP_SIZES` must be set to a different value(s) supported by the device.

### Tests
Expand All @@ -59,7 +59,7 @@ Run the tests from the build folder with:
ctest
```

### SYCL-FFT benchmarks
### portFFT benchmarks

Run pre-defined benchmarks from the build folder with:

Expand All @@ -77,7 +77,7 @@ Use the `--help` flag to print help message on the configuration syntax.

## Supported configurations

SYCL-FFT is still in early development. The supported configurations are:
portFFT is still in early development. The supported configurations are:

* complex to complex transforms
* single and double precisions
Expand All @@ -103,7 +103,7 @@ By default the library assumes subgroup size of 32 is used. If that is not suppo

## Known issues

* Specialization constants are currently emulated on Nvidia and AMD backends. SYCL-FFT relies on this feature on Nvidia devices in particular so the performance is not optimal on these devices.
* Specialization constants are currently emulated on Nvidia and AMD backends. portFFT relies on this feature on Nvidia devices in particular so the performance is not optimal on these devices.

We are investigating other performance issues that affect all the backends.

Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindDPCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# * Codeplay's SYCL-FFT
# * Codeplay's portFFT
# *
# * @filename CMakeLists.txt
# *
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindSYCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# * Codeplay's SYCL-FFT
# * Codeplay's portFFT
# *
# * @filename CMakeLists.txt
# *
Expand Down
4 changes: 2 additions & 2 deletions hooks/clang-format-all.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
#
# (C) Codeplay Software Ltd
# SYCL-FFT source code formatting script
# portFFT source code formatting script
#
# NB: SYCL-FFT uses clang-format 11.
# NB: portFFT uses clang-format 11.
#

set -euo pipefail
Expand Down
2 changes: 1 addition & 1 deletion hooks/is-clang-formatted.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# (C) Codeplay Software Ltd
# SYCL-FFT source code formatting check script
# portFFT source code formatting check script

set -euo pipefail
IFS=$'\n\t'
Expand Down
2 changes: 1 addition & 1 deletion include/sycl_fft.hpp → include/portfft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
**************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark_reference_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_precomputed_fft_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_reference_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
* A tool to generate FFT reference data and headers detailing this data.
*
Expand All @@ -29,7 +29,7 @@
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--build_path",
help="The path of the build directory for SYCL-FFT",
help="The path of the build directory for portFFT",
required=True)
parser.add_argument("--verbose", help="Verbose", action='store_true')
parser.add_argument("--data",
Expand Down
10 changes: 5 additions & 5 deletions scripts/generate_twiddles.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
import math
Expand All @@ -28,14 +28,14 @@
*
**************************************************************************/
#ifndef SYCL_FFT_COMMON_TWIDDLE_HPP
#define SYCL_FFT_COMMON_TWIDDLE_HPP
#ifndef PORTFFT_COMMON_TWIDDLE_HPP
#define PORTFFT_COMMON_TWIDDLE_HPP
#pragma clang diagnostic push
// The twiddle precision can be lower than the constants used here when not using double precision.
#pragma clang diagnostic ignored "-Wimplicit-float-conversion"
namespace sycl_fft::detail {{
namespace portfft::detail {{
template <typename T>
struct twiddle {{
Expand All @@ -50,7 +50,7 @@
static constexpr T im[{size}][{size}] = {{ {imag_forward} }};
// clang-format on
}};
}} // namespace sycl_fft::detail
}} // namespace portfft::detail
#pragma clang diagnostic pop
Expand Down
10 changes: 5 additions & 5 deletions scripts/generate_verification_data_integration_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
from pathlib import Path
Expand All @@ -26,8 +26,8 @@
*
**************************************************************************/
#ifndef SYCL_FFT_{include_guard_str}_HPP
#define SYCL_FFT_{include_guard_str}_HPP
#ifndef PORTFFT_{include_guard_str}_HPP
#define PORTFFT_{include_guard_str}_HPP
#include "reference_data_wrangler.hpp"
const std::vector<verif_data_spec> verification_data({{
Expand Down Expand Up @@ -69,8 +69,8 @@ def generate_header_string(config_dicts, output_file_path, header_guard_name):
"[", "").replace("]", "")
batch_string = str(d["batch"])
file_string = str(d["file_path"])
domain_bool = "sycl_fft::domain::COMPLEX" if d[
"transform_type"] == "COMPLEX" else "sycl_fft::domain::REAL"
domain_bool = "portfft::domain::COMPLEX" if d[
"transform_type"] == "COMPLEX" else "portfft::domain::REAL"
f.write(
template_per_item.format(dft_sizes_str=dftSizesStr,
batch_str=batch_string,
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_reference_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion scripts/verification_data_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
************************************************************************"""
from pathlib import Path
Expand Down
14 changes: 7 additions & 7 deletions src/common/cooley_tukey_compiled_sizes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
**************************************************************************/

#ifndef SYCL_FFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
#define SYCL_FFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
#ifndef PORTFFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
#define PORTFFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
#include <cstdint>

namespace sycl_fft::detail {
namespace portfft::detail {

/** A list of supported FFT sizes.
* @tparam Sizes The supported FFT sizes.
Expand Down Expand Up @@ -52,8 +52,8 @@ struct size_list<Size, OtherSizes...> {
}
};

using cooley_tukey_size_list_t = size_list<SYCLFFT_COOLEY_TUKEY_OPTIMIZED_SIZES>;
using cooley_tukey_size_list_t = size_list<PORTFFT_COOLEY_TUKEY_OPTIMIZED_SIZES>;

} // namespace sycl_fft::detail
} // namespace portfft::detail

#endif // SYCL_FFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
#endif // PORTFFT_COOLEY_TUKEY_COMPILED_SIZES_HPP
10 changes: 5 additions & 5 deletions src/common/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Codeplay's SYCL-FFT
* Codeplay's portFFT
*
**************************************************************************/

#ifndef SYCL_FFT_COMMON_HELPERS_HPP
#define SYCL_FFT_COMMON_HELPERS_HPP
#ifndef PORTFFT_COMMON_HELPERS_HPP
#define PORTFFT_COMMON_HELPERS_HPP

#include <sycl/sycl.hpp>
#include <type_traits>

namespace sycl_fft::detail {
namespace portfft::detail {

/**
* Implements a loop that will be fully unrolled.
Expand Down Expand Up @@ -108,6 +108,6 @@ auto get_access(const sycl::buffer<T_src, 1>& buf, sycl::handler& cgh) {
return buf.template reinterpret<T, 1>(2 * buf.size()).template get_access<sycl::access::mode::write>(cgh);
}

}; // namespace sycl_fft::detail
}; // namespace portfft::detail

#endif
Loading

0 comments on commit 71862ae

Please sign in to comment.