Skip to content

Commit

Permalink
Remove submodule and sync shared files from rocFFT
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmroberts authored Jan 16, 2024
2 parents dab6019 + 27ae15a commit 18c75d8
Show file tree
Hide file tree
Showing 46 changed files with 10,966 additions and 66 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Partial documentation for hipFFT is available at [hipFFT].

## hipFFT 1.0.13 for ROCm 6.0.1

### Changed

- Remove the git submodule for shared files between rocFFT and hipFFT; instead, just copy the files over. This should help simplify downstream builds and packaging.

## hipFFT 1.0.13 for ROCm 6.0.0

### Changed
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ To build the hipFFT library:

### Building hipFFT

To show all build options:
3. Build hipFFT:

mkdir build && cd build
cmake -LH ..
To show all build options:

```bash
mkdir build && cd build
cmake -LH ..
```

Here are some CMake build examples:

Expand Down
15 changes: 0 additions & 15 deletions clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,6 @@ if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" AND NOT CMAKE_CXX_COMPILER_ID STR
endif()


if( GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git" )
message(STATUS "rocFFT submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/clients/rocFFT
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if( NOT GIT_SUBMOD_RESULT EQUAL "0" )
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules manually.")
endif( )
endif( )

if( NOT EXISTS "${CMAKE_SOURCE_DIR}/clients/rocFFT/CMakeLists.txt" )
message(FATAL_ERROR "The rocFFT submodule is not present! Please update git submodules and try again. ${CMAKE_CURRENT_SOURCE_DIR}/clients/rocFFT/CMakeLists.txt")
endif( )


# This option only works for make/nmake and the ninja generators, but no reason it shouldn't be on
# all the time
# This tells cmake to create a compile_commands.json file that can be used with clang tooling or vim
Expand Down
4 changes: 2 additions & 2 deletions clients/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ find_package( Boost COMPONENTS program_options REQUIRED)
set( Boost_USE_STATIC_LIBS OFF )


set( hipfft_bench_source bench.cpp ../rocFFT/shared/array_validator.cpp )
set( hipfft_bench_includes bench.h ../rocFFT/shared/array_validator.h )
set( hipfft_bench_source bench.cpp ../../shared/array_validator.cpp )
set( hipfft_bench_includes bench.h ../../shared/array_validator.h )

add_executable( hipfft-bench ${hipfft_bench_source} ${hipfft_bench_includes} )

Expand Down
2 changes: 1 addition & 1 deletion clients/bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <boost/program_options.hpp>
namespace po = boost::program_options;

#include "../rocFFT/shared/gpubuf.h"
#include "../../shared/gpubuf.h"

int main(int argc, char* argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion clients/hipfft_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

#include <optional>

#include "../shared/fft_params.h"
#include "hipfft/hipfft.h"
#include "hipfft/hipfftXt.h"
#include "rocFFT/shared/fft_params.h"

inline fft_status fft_status_from_hipfftparams(const hipfftResult_t val)
{
Expand Down
1 change: 0 additions & 1 deletion clients/rocFFT
Submodule rocFFT deleted from d1c911
11 changes: 1 addition & 10 deletions clients/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@ set( hipfft-test_source
accuracy_test_3D.cpp
accuracy_test_callback.cpp
multi_device_test.cpp
../rocFFT/shared/array_validator.cpp
)

set( hipfft-test_includes
../rocFFT/clients/tests/fftw_transform.h
../rocFFT/clients/tests/rocfft_against_fftw.h
../rocFFT/clients/tests/misc/include/test_exception.h
../rocFFT/shared/array_validator.h
../../shared/array_validator.cpp
)

add_executable( hipfft-test ${hipfft-test_source} ${hipfft-test_includes} )
Expand All @@ -56,8 +49,6 @@ target_include_directories(
$<BUILD_INTERFACE:${FFTW_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${hip_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../rocFFT/library/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../rocFFT/clients/tests>
)


Expand Down
8 changes: 4 additions & 4 deletions clients/tests/accuracy_test_1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include <stdexcept>
#include <vector>

#include "../rocFFT/shared/fft_params.h"
#include "../../shared/fft_params.h"

#include "accuracy_test.h"
#include "fftw_transform.h"
#include "rocfft_against_fftw.h"
#include "../../shared/accuracy_test.h"
#include "../../shared/fftw_transform.h"
#include "../../shared/rocfft_against_fftw.h"

using ::testing::ValuesIn;

Expand Down
8 changes: 4 additions & 4 deletions clients/tests/accuracy_test_2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include <stdexcept>
#include <vector>

#include "../rocFFT/shared/fft_params.h"
#include "../../shared/fft_params.h"

#include "accuracy_test.h"
#include "fftw_transform.h"
#include "rocfft_against_fftw.h"
#include "../../shared/accuracy_test.h"
#include "../../shared/fftw_transform.h"
#include "../../shared/rocfft_against_fftw.h"

using ::testing::ValuesIn;

Expand Down
8 changes: 4 additions & 4 deletions clients/tests/accuracy_test_3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include <stdexcept>
#include <vector>

#include "../rocFFT/shared/fft_params.h"
#include "../../shared/fft_params.h"

#include "accuracy_test.h"
#include "fftw_transform.h"
#include "rocfft_against_fftw.h"
#include "../../shared/accuracy_test.h"
#include "../../shared/fftw_transform.h"
#include "../../shared/rocfft_against_fftw.h"

using ::testing::ValuesIn;

Expand Down
2 changes: 1 addition & 1 deletion clients/tests/accuracy_test_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "accuracy_test.h"
#include "../../shared/accuracy_test.h"

std::vector<std::vector<size_t>> callback_sizes = {
// some single kernel sizes
Expand Down
6 changes: 3 additions & 3 deletions clients/tests/gtest_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
#include <streambuf>
#include <string>

#include "../../shared/concurrency.h"
#include "../../shared/environment.h"
#include "../../shared/work_queue.h"
#include "../hipfft_params.h"
#include "../rocFFT/shared/concurrency.h"
#include "../rocFFT/shared/environment.h"
#include "../rocFFT/shared/work_queue.h"
#include "hipfft/hipfft.h"
#include "hipfft_accuracy_test.h"
#include "hipfft_test_params.h"
Expand Down
11 changes: 6 additions & 5 deletions clients/tests/hipfft_accuracy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
#include "hipfft/hipfft.h"

#include "../hipfft_params.h"
#include "../rocFFT/clients/tests/fftw_transform.h"
#include "../rocFFT/clients/tests/rocfft_accuracy_test.h"
#include "../rocFFT/clients/tests/rocfft_against_fftw.h"
#include "../rocFFT/shared/gpubuf.h"
#include "../rocFFT/shared/rocfft_complex.h"

#include "../../shared/accuracy_test.h"
#include "../../shared/fftw_transform.h"
#include "../../shared/gpubuf.h"
#include "../../shared/rocfft_against_fftw.h"
#include "../../shared/rocfft_complex.h"

void fft_vs_reference(hipfft_params& params, bool round_trip)
{
Expand Down
2 changes: 1 addition & 1 deletion clients/tests/hipfft_accuracy_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#ifndef ROCFFT_ACCURACY_TEST
#define ROCFFT_ACCURACY_TEST

#include "../../shared/accuracy_test.h"
#include "../hipfft_params.h"
#include "../rocFFT/clients/tests/accuracy_test.h"

void fft_vs_reference(hipfft_params& params, bool round_trip = false);

Expand Down
2 changes: 1 addition & 1 deletion clients/tests/multi_device_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "accuracy_test.h"
#include "../../shared/accuracy_test.h"
#include <gtest/gtest.h>
#include <hip/hip_runtime_api.h>

Expand Down
3 changes: 0 additions & 3 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#
# #############################################################################

# Git
find_package(Git REQUIRED)

# HIP
if( NOT CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
if( NOT BUILD_WITH_LIB STREQUAL "CUDA" )
Expand Down
8 changes: 4 additions & 4 deletions library/src/amd_detail/hipfft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <string>
#include <vector>

#include "../../../clients/rocFFT/shared/arithmetic.h"
#include "../../../clients/rocFFT/shared/gpubuf.h"
#include "../../../clients/rocFFT/shared/ptrdiff.h"
#include "../../../clients/rocFFT/shared/rocfft_hip.h"
#include "../../../shared/arithmetic.h"
#include "../../../shared/gpubuf.h"
#include "../../../shared/ptrdiff.h"
#include "../../../shared/rocfft_hip.h"

#define ROC_FFT_CHECK_ALLOC_FAILED(ret) \
{ \
Expand Down
Loading

0 comments on commit 18c75d8

Please sign in to comment.