Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ if(RPP_AUDIO_SUPPORT)
set(RPP_AUDIO_AUGMENTATIONS_SUPPORT 1)
message("-- ${White}${PROJECT_NAME} -- Using FFTS - Library: ${FFTS_LIBRARIES} Include: ${FFTS_INCLUDE_DIRS}${ColourReset}")
else()
message("-- ${Yellow}RPP_AUDIO_SUPPORT set to build without FFTS${ColourReset}")
message("-- ${Yellow}${PROJECT_NAME} set to build without RPP_AUDIO_SUPPORT${ColourReset}")
set(RPP_AUDIO_AUGMENTATIONS_SUPPORT 0)
endif()
message("-- ${Green}${PROJECT_NAME} set to build with RPP_AUDIO_SUPPORT${ColourReset}")
Expand Down Expand Up @@ -404,7 +404,7 @@ 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)
if(RPP_AUDIO_SUPPORT AND FFTS_FOUND)
set(CPACK_RESOURCE_FILE_FFTS_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ffts/FFTS_LICENSE")
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)
Expand Down
23 changes: 2 additions & 21 deletions cmake/FindFFTS.cmake
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
#[[
MIT License

Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright © 2019-2025 Advanced Micro Devices, Inc. or its affiliates.
SPDX-License-Identifier: MIT
]]

find_path(FFTS_INCLUDE_DIR
Expand Down
4 changes: 2 additions & 2 deletions src/modules/tensor/cpu/kernel/spectrogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ RppStatus spectrogram_host_tensor(Rpp32f *srcPtr,
}

// Set temporary buffers to 0
Rpp32f *fftInBuf = static_cast<Rpp32f*>(_mm_malloc(fftInSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory
Rpp32f *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
Comment on lines +183 to +184
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignas(32) directive is redundant here since _mm_malloc already guarantees 32-byte alignment. The alignas directive applies to the pointer variable itself, not the allocated memory it points to. Remove the alignas(32) directives as they serve no purpose and may cause confusion.

Suggested change
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
Rpp32f *fftInBuf = static_cast<Rpp32f*>(_mm_malloc(fftInSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory
Rpp32f *fftOutBuf = static_cast<Rpp32f*>(_mm_malloc(fftOutSize * sizeof(Rpp32f), 32)); // ffts requires 32-byte aligned memory

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exact opposite of your previous recommendation @copilot!


for (Rpp32s w = 0; w < numWindows; w++)
{
Expand Down