Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
49bcdbb
Add FFTS as submodule
HazarathKumarM Sep 18, 2025
f9043c0
Removed the static dependencies of FFT and addded support to dynamica…
HazarathKumarM Sep 18, 2025
13088e0
Revert changes
HazarathKumarM Sep 18, 2025
348f968
Address review comments
HazarathKumarM Sep 19, 2025
d9ed78c
Merge pull request #492 from HazarathKumarM/hk/ffts
r-abishek Sep 23, 2025
314e300
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Sep 23, 2025
a21147e
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Sep 23, 2025
2e04431
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Sep 26, 2025
0faf6ec
resolve review comments
HazarathKumarM Sep 30, 2025
8caafde
Merge remote-tracking branch 'origin/develop' into hk/ffts
HazarathKumarM Sep 30, 2025
89491f2
Merge branch 'ROCm:develop' into ar/build_fix_ffts_dynamic_link
r-abishek Oct 2, 2025
c59f807
Merge branch 'ar/build_fix_ffts_dynamic_link' into hk/ffts
r-abishek Oct 2, 2025
a9bfc51
Merge pull request #500 from HazarathKumarM/hk/ffts
r-abishek Oct 2, 2025
27ae539
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Oct 2, 2025
78d2318
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
r-abishek Oct 8, 2025
c197f37
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Oct 10, 2025
2540a36
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
r-abishek Oct 16, 2025
d4d0b71
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
LakshmiKumar23 Oct 21, 2025
faff967
fix ffts build issues
HazarathKumarM Oct 24, 2025
adcb163
fix review comments
HazarathKumarM Oct 27, 2025
eaca404
removed additional RPP_AUDIO_AUGMENTATION_SUPPORT flag
HazarathKumarM Oct 28, 2025
4bbd8c9
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Oct 28, 2025
dc2f820
revert Audio flag changes
HazarathKumarM Oct 29, 2025
1ab09b6
Merge pull request #510 from HazarathKumarM/hk/ffts
r-abishek Oct 29, 2025
59d229e
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
LakshmiKumar23 Oct 29, 2025
2ebc6eb
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Nov 3, 2025
531e7ba
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Nov 13, 2025
43bf468
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
r-abishek Nov 13, 2025
d4632d1
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
kiritigowda Nov 17, 2025
db65abc
Merge branch 'develop' into ar/build_fix_ffts_dynamic_link
hmaddise Nov 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/ffts"]
path = third_party/ffts
url = https://github.com/anthonix/ffts.git
29 changes: 19 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,17 @@ find_package(HALF REQUIRED)
include_directories(${HALF_INCLUDE_DIRS})

if (RPP_AUDIO_SUPPORT)
add_definitions(-DAUDIO_SUPPORT) # For compile flags in RPP
set(RPP_AUDIO_AUGMENTATIONS_SUPPORT 1) # For cmakedefine01 in rpp_audio_augmentations_support.h.in
find_package(FFTS QUIET)
if(FFTS_FOUND)
add_definitions(-DAUDIO_SUPPORT) # For compile flags in RPP
set(RPP_AUDIO_AUGMENTATIONS_SUPPORT 1) # For cmakedefine01 in rpp_audio_augmentations_support.h.in
message("-- ${Green}${PROJECT_NAME} set to build with RPP_AUDIO_SUPPORT${ColourReset}")
else()
set(RPP_AUDIO_SUPPORT OFF) # Disable audio support if FFTS not found
message("-- ${Yellow}FFTS not found. ${PROJECT_NAME} set to build without RPP_AUDIO_SUPPORT${ColourReset}")
endif()
else()
message("-- ${Yellow}${PROJECT_NAME} set to build without RPP_AUDIO_SUPPORT${ColourReset}")
endif()

if (RPP_LEGACY_SUPPORT)
Expand Down Expand Up @@ -334,17 +343,13 @@ target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARY_LIST})
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
if(RPP_AUDIO_SUPPORT)
target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/third_party/ffts/lib/libffts.a)
message("-- ${Green}${PROJECT_NAME} set to build with RPP_AUDIO_SUPPORT${ColourReset}")
else()
message("-- ${Yellow}${PROJECT_NAME} set to build without RPP_AUDIO_SUPPORT${ColourReset}")
target_link_libraries(${PROJECT_NAME} FFTS::FFTS)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})

target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/api
$<$<BOOL:${RPP_AUDIO_SUPPORT}>:${CMAKE_CURRENT_SOURCE_DIR}/third_party/ffts/include>
${ROCM_PATH}/include
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/include/cpu
Expand Down Expand Up @@ -400,9 +405,13 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/utilities/rpp-performancetests DES
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime)
install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan COMPONENT asan)
set(CPACK_RESOURCE_FILE_FFTS_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ffts/FFTS_LICENSE")
install(FILES ${CPACK_RESOURCE_FILE_FFTS_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime)
install(FILES ${CPACK_RESOURCE_FILE_FFTS_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan COMPONENT asan)
if(RPP_AUDIO_SUPPORT AND FFTS_FOUND)
set(CPACK_RESOURCE_FILE_FFTS_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ffts/COPYRIGHT")
if(EXISTS ${CPACK_RESOURCE_FILE_FFTS_LICENSE})
install(FILES ${CPACK_RESOURCE_FILE_FFTS_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime)
install(FILES ${CPACK_RESOURCE_FILE_FFTS_LICENSE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan COMPONENT asan)
endif()
endif()

# Cmake module config file configurations
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" CACHE INTERNAL "Default module path.")
Expand Down
48 changes: 48 additions & 0 deletions cmake/FindFFTS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#[[
Copyright © 2019-2025 Advanced Micro Devices, Inc. or its affiliates.
SPDX-License-Identifier: MIT
]]

find_path(FFTS_INCLUDE_DIR
NAMES ffts/ffts.h ffts.h
PATHS
/usr/local/include
/usr/include
/opt/local/include
/opt/include
PATH_SUFFIXES ffts
)

find_library(FFTS_LIBRARY
NAMES ffts
PATHS
/usr/local/lib
/usr/lib
/usr/local/lib64
/usr/lib64
/opt/local/lib
/opt/lib
)

# Mark the variables as advanced
mark_as_advanced(FFTS_INCLUDE_DIR FFTS_LIBRARY)

# Check if we found the library and headers
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FFTS
REQUIRED_VARS FFTS_LIBRARY FFTS_INCLUDE_DIR
)

if(FFTS_FOUND)
set(FFTS_LIBRARIES ${FFTS_LIBRARY})
set(FFTS_INCLUDE_DIRS ${FFTS_INCLUDE_DIR})
endif()

# Create imported target
if(FFTS_FOUND AND NOT TARGET FFTS::FFTS)
add_library(FFTS::FFTS SHARED IMPORTED)
set_target_properties(FFTS::FFTS PROPERTIES
IMPORTED_LOCATION "${FFTS_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FFTS_INCLUDE_DIRS}"
)
endif()
1 change: 0 additions & 1 deletion src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories( ${PROJECT_NAME}
PUBLIC
${CMAKE_SOURCE_DIR}/api
${CMAKE_SOURCE_DIR}/third_party/ffts/include
${ROCM_INC}
PRIVATE
$<$<BOOL:${RPP_LEGACY_SUPPORT}>:${CMAKE_SOURCE_DIR}/src/include/batch_pd/cpu>
Expand Down
7 changes: 3 additions & 4 deletions src/modules/tensor/cpu/kernel/spectrogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ SOFTWARE.
*/

#include "host_tensor_executors.hpp"
#include "ffts.h"
#include "ffts_attributes.h"
#include <ffts/ffts.h>
#include <complex>

inline bool is_pow2(Rpp64s n) { return (n & (n-1)) == 0; }
Expand Down Expand Up @@ -181,8 +180,8 @@ RppStatus spectrogram_host_tensor(Rpp32f *srcPtr,
}

// Set temporary buffers to 0
Rpp32f FFTS_ALIGN(32) *fftInBuf = static_cast<Rpp32f*>(_mm_malloc(fftInSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory
Rpp32f FFTS_ALIGN(32) *fftOutBuf = static_cast<Rpp32f*>(_mm_malloc(fftOutSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory
alignas(32) Rpp32f *fftInBuf = static_cast<Rpp32f*>(_mm_malloc(fftInSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory
alignas(32) Rpp32f *fftOutBuf = static_cast<Rpp32f*>(_mm_malloc(fftOutSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory

for (Rpp32s w = 0; w < numWindows; w++)
{
Expand Down
1 change: 1 addition & 0 deletions third_party/ffts
Submodule ffts added at b22d83
24 changes: 0 additions & 24 deletions third_party/ffts/FFTS_LICENSE

This file was deleted.

110 changes: 0 additions & 110 deletions third_party/ffts/include/ffts.h

This file was deleted.

111 changes: 0 additions & 111 deletions third_party/ffts/include/ffts_attributes.h

This file was deleted.

Binary file removed third_party/ffts/lib/libffts.a
Binary file not shown.