ROCm / hipFFT

hipFFT is a FFT marshalling library.
https://rocm.docs.amd.com/projects/hipFFT/en/latest/
Other
53 stars 34 forks source link

hipFFT 5.7.1 compilation hang/warnings (non-void function does not return a value in all control paths [-Wreturn-type]) #87

Closed jmcelroy01 closed 7 months ago

jmcelroy01 commented 8 months ago

Problem Description

When compiling hip-FFT-5.7.1 on Gentoo x86_64, the compilation hangs around step [61-62/63] for about 20 minutes before eventually completing, and generates many QA warnings upon installing.

[61/63] /usr/bin/cmake -E cmake_symlink_library library/src/librocfft.so.0.1  library/src/librocfft.so.0 library/src/librocfft.so && :
[62/63] : && /usr/bin/hipcc -march=native -O3 -pipe -Wl,-O1 -Wl,--as-needed library/src/CMakeFiles/rocfft-rtc-cache.dir/rtc_cache.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_bluestein_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_realcomplex_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_stockham_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_transpose_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_twiddle_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-gen.dir/rtc_chirp_gen.cpp.o library/src/CMakeFiles/rocfft-rtc-compile.dir/rtc_compile.cpp.o library/src/CMakeFiles/rocfft-rtc-subprocess.dir/rtc_subprocess.cpp.o library/src/CMakeFiles/rocfft-rtc-common.dir/device/kernel-generator-embed.cpp.o library/src/CMakeFiles/rocfft-rtc-common.dir/compute_scheme.cpp.o library/src/CMakeFiles/rocfft-rtc-common.dir/rocfft_ostream.cpp.o library/src/device/generator/CMakeFiles/generator.dir/generator.cpp.o library/src/device/generator/CMakeFiles/generator.dir/fftgenerator.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_bluestein_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_realcomplex_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_stockham_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_transpose_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_twiddle_kernel.cpp.o library/src/CMakeFiles/rocfft-rtc-launch.dir/rtc_chirp_kernel.cpp.o library/src/device/CMakeFiles/rocfft-function-pool.dir/function_pool.cpp.o library/src/CMakeFiles/rocfft_config_search.dir/rocfft_config_search.cpp.o library/src/CMakeFiles/rocfft_config_search.dir/rocfft_stub.cpp.o -o library/src/rocfft_config_search  -ldl  -lpthread  /usr/lib64/libsqlite3.so  -lstdc++fs  /usr/lib64/libamdhip64.so.5.7.31921  /usr/lib/llvm/17/bin/../../../../lib/clang/17/lib/linux/libclang_rt.builtins-x86_64.a  /usr/lib64/libsqlite3.so  -L/usr/lib  -lhiprtc  -ldl && :
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: skipping incompatible /usr/lib/libc.a when searching for -lc
>>> Emerging (2 of 2) sci-libs/hipFFT-5.7.1-r1::gentoo
 * hipFFT-rocm-5.7.1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                                                                                                 [ ok ]
>>> Unpacking source...
>>> Unpacking hipFFT-rocm-5.7.1.tar.gz to /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work
>>> Source unpacked in /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work
>>> Preparing source in /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build"
 * Applying hipFFT-5.0.2-remove-git-dependency.patch ...
patching file cmake/dependencies.cmake
patching file clients/CMakeLists.txt
Hunk #1 succeeded at 65 with fuzz 2 (offset 11 lines).                                                                                                         [ ok ]
 * Applying hipFFT-4.3.0-add-complex-header.patch ...
patching file clients/rider/rider.cpp
Hunk #1 succeeded at 23 with fuzz 2 (offset 1 line).                                                                                                           [ ok ]
 * Applying hipFFT-5.7.1_hip-config.patch ...                                                                                                                  [ ok ]
 * Hardcoded definition(s) removed in deps/CMakeLists.txt:
 *    set( CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/package" CACHE PATH "Insta
 *    set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, optio
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *    set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, optio
 *    set(CMAKE_INSTALL_PREFIX "C:/hipSDK" CACHE PATH "Install path" FORCE)
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build"
cmake -C /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULE_PATH=/usr/lib64/cmake/hip -DROCM_SYMLINK_LIBS=OFF -DBUILD_CLIENTS_TESTS=OFF -DBUILD_CLIENTS_RIDER=OFF -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build/gentoo_toolchain.cmake /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1
loading initial cache file /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build/gentoo_common_config.cmake
-- The CXX compiler identification is Clang 17.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/hipcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BUILD_WITH_COMPILER = HIP-CLANG
CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config.cmake:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  cmake/dependencies.cmake:41 (find_package)
  CMakeLists.txt:142 (include)

CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config-amd.cmake:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /usr/lib64/cmake/hip/hip-config.cmake:160 (include)
  cmake/dependencies.cmake:41 (find_package)
  CMakeLists.txt:142 (include)

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- hip::amdhip64 is SHARED_LIBRARY
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS - Failed
-- /usr/bin/hipcc: CLANGRT compiler options not supported.
CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config.cmake:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib64/cmake/rocfft/rocfft-config.cmake:90 (find_dependency)
  cmake/dependencies.cmake:48 (find_package)
  CMakeLists.txt:142 (include)

CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config-amd.cmake:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /usr/lib64/cmake/hip/hip-config.cmake:160 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib64/cmake/rocfft/rocfft-config.cmake:90 (find_dependency)
  cmake/dependencies.cmake:48 (find_package)
  CMakeLists.txt:142 (include)

-- hip::amdhip64 is SHARED_LIBRARY
-- /usr/bin/hipcc: CLANGRT compiler options not supported.
-- Found ROCm
CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config.cmake:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  library/CMakeLists.txt:34 (find_package)

CMake Deprecation Warning at /usr/lib64/cmake/hip/hip-config-amd.cmake:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /usr/lib64/cmake/hip/hip-config.cmake:160 (include)
  library/CMakeLists.txt:34 (find_package)

-- hip::amdhip64 is SHARED_LIBRARY
-- /usr/bin/hipcc: CLANGRT compiler options not supported.
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C
C++             -march=native -O3 -pipe
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring done (13.0s)
-- Generating done (0.0s)
-- Build files have been written to: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1 ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build"
ninja -v -j15 -l9
[1/3] /usr/bin/hipcc -Dhipfft_EXPORTS -I/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/include -I/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/include -I/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build/include/hipfft -I/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build/include -I/include  -march=native -O3 -pipe -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wno-unused-function -Wimplicit-fallthrough -Wunreachable-code -Wno-unknown-pragmas -MD -MT library/CMakeFiles/hipfft.dir/src/hcc_detail/hipfft.cpp.o -MF library/CMakeFiles/hipfft.dir/src/hcc_detail/hipfft.cpp.o.d -o library/CMakeFiles/hipfft.dir/src/hcc_detail/hipfft.cpp.o -c /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp
/usr/bin/rocm_agent_enumerator:95: SyntaxWarning: invalid escape sequence '\w'
  @staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?"))
/usr/bin/rocm_agent_enumerator:152: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)")
/usr/bin/rocm_agent_enumerator:154: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)")
/usr/bin/rocm_agent_enumerator:175: SyntaxWarning: invalid escape sequence '\w'
  target_search_term = re.compile("1002:\w+")
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:159:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  159 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  171 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:175:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  175 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  186 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:190:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  190 |         switch(outputType)
      |                ^~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  201 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1116:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1116 |         hipFree(plan->workBuffer);
      |         ^~~~~~~ ~~~~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1236:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1236 |             hipFree(plan->workBuffer);
      |             ^~~~~~~ ~~~~~~~~~~~~~~~~
8 warnings generated when compiling for gfx1032.
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:159:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  159 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  171 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:175:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  175 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  186 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:190:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  190 |         switch(outputType)
      |                ^~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  201 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1116:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1116 |         hipFree(plan->workBuffer);
      |         ^~~~~~~ ~~~~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1236:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1236 |             hipFree(plan->workBuffer);
      |             ^~~~~~~ ~~~~~~~~~~~~~~~~
8 warnings generated when compiling for gfx1035.
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:159:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  159 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  171 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:175:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  175 |         switch(inputType)
      |                ^~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  186 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:190:16: warning: 22 enumeration values not handled in switch: 'HIP_R_8I', 'HIP_C_8I', 'HIP_R_8U'... [-Wswitch]
  190 |         switch(outputType)
      |                ^~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  201 |     }
      |     ^
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1116:9: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1116 |         hipFree(plan->workBuffer);
      |         ^~~~~~~ ~~~~~~~~~~~~~~~~
/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:1236:13: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
 1236 |             hipFree(plan->workBuffer);
      |             ^~~~~~~ ~~~~~~~~~~~~~~~~
8 warnings generated when compiling for host.
[2/3] : && /usr/bin/hipcc -fPIC -march=native -O3 -pipe  -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,libhipfft.so.0 -o library/libhipfft.so.0.1 library/CMakeFiles/hipfft.dir/src/hcc_detail/hipfft.cpp.o  /usr/lib64/librocfft.so.0.1  -ldl  -lpthread && :
/usr/bin/rocm_agent_enumerator:95: SyntaxWarning: invalid escape sequence '\w'
  @staticVars(search_name=re.compile("gfx[0-9a-fA-F]+(:[-+:\w]+)?"))
/usr/bin/rocm_agent_enumerator:152: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(amdgcn-amd-amdhsa--gfx\d+)")
/usr/bin/rocm_agent_enumerator:154: SyntaxWarning: invalid escape sequence '\A'
  line_search_term = re.compile("\A\s+Name:\s+(gfx\d+)")
/usr/bin/rocm_agent_enumerator:175: SyntaxWarning: invalid escape sequence '\w'
  target_search_term = re.compile("1002:\w+")
[3/3] /usr/bin/cmake -E cmake_symlink_library library/libhipfft.so.0.1  library/libhipfft.so.0 library/libhipfft.so && :
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: sci-libs/hipFFT-5.7.1-r1

>>> Install sci-libs/hipFFT-5.7.1-r1 into /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build"
ninja -v -j15 -l9 install
[0/1] cd /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1_build && /usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include/hipfft
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include/hipfft/hipfft-version.h
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include/hipfft/hipfft-export.h
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include/hipfft/hipfft.h
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/include/hipfft/hipfftXt.h
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/libhipfft.so.0.1
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/libhipfft.so.0
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/libhipfft.so
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/cmake/hipfft/hipfft-targets.cmake
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/cmake/hipfft/hipfft-targets-relwithdebinfo.cmake
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/cmake/hipfft/hipfft-config.cmake
-- Installing: /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image/usr/lib64/cmake/hipfft/hipfft-config-version.cmake
>>> Completed installing sci-libs/hipFFT-5.7.1-r1 into /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/image

 * Final size of build directory: 1224 KiB (1.1 MiB)
 * Final size of installed tree:   140 KiB

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:171:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:186:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
 * /var/tmp/portage/sci-libs/hipFFT-5.7.1-r1/work/hipFFT-rocm-5.7.1/library/src/hcc_detail/hipfft.cpp:201:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]

Operating System

Gentoo 2.14 x86_64

CPU

AMD Ryzen 9 6900HS

GPU

AMD Radeon RX 7900 XT

ROCm Version

ROCm 5.7.1

ROCm Component

hipFFT

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version:         1.1
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE
System Endianness:       LITTLE

==========
HSA Agents
==========
*******
Agent 1
*******
  Name:                    AMD Ryzen 9 6900HS with Radeon Graphics
  Uuid:                    CPU-XX
  Marketing Name:          AMD Ryzen 9 6900HS with Radeon Graphics
  Vendor Name:             CPU
  Feature:                 None specified
  Profile:                 FULL_PROFILE
  Float Round Mode:        NEAR
  Max Queue Number:        0(0x0)
  Queue Min Size:          0(0x0)
  Queue Max Size:          0(0x0)
  Queue Type:              MULTI
  Node:                    0
  Device Type:             CPU
  Cache Info:
    L1:                      32768(0x8000) KB
  Chip ID:                 0(0x0)
  ASIC Revision:           0(0x0)
  Cacheline Size:          64(0x40)
  Max Clock Freq. (MHz):   4935
  BDFID:                   0
  Internal Node ID:        0
  Compute Unit:            16
  SIMDs per CU:            0
  Shader Engines:          0
  Shader Arrs. per Eng.:   0
  WatchPts on Addr. Ranges:1
  Features:                None
  Pool Info:
    Pool 1
      Segment:                 GLOBAL; FLAGS: FINE GRAINED
      Size:                    40237192(0x265f888) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
    Pool 2
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    40237192(0x265f888) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
    Pool 3
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED
      Size:                    40237192(0x265f888) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       TRUE
  ISA Info:
*******
Agent 2
*******
  Name:                    gfx1032
  Uuid:                    GPU-XX
  Marketing Name:          AMD Radeon RX 6700S
  Vendor Name:             AMD
  Feature:                 KERNEL_DISPATCH
  Profile:                 BASE_PROFILE
  Float Round Mode:        NEAR
  Max Queue Number:        128(0x80)
  Queue Min Size:          64(0x40)
  Queue Max Size:          131072(0x20000)
  Queue Type:              MULTI
  Node:                    1
  Device Type:             GPU
  Cache Info:
    L1:                      16(0x10) KB
    L2:                      2048(0x800) KB
    L3:                      32768(0x8000) KB
  Chip ID:                 29679(0x73ef)
  ASIC Revision:           0(0x0)
  Cacheline Size:          64(0x40)
  Max Clock Freq. (MHz):   2435
  BDFID:                   768
  Internal Node ID:        1
  Compute Unit:            28
  SIMDs per CU:            2
  Shader Engines:          2
  Shader Arrs. per Eng.:   2
  WatchPts on Addr. Ranges:4
  Features:                KERNEL_DISPATCH
  Fast F16 Operation:      TRUE
  Wavefront Size:          32(0x20)
  Workgroup Max Size:      1024(0x400)
  Workgroup Max Size per Dimension:
    x                        1024(0x400)
    y                        1024(0x400)
    z                        1024(0x400)
  Max Waves Per CU:        32(0x20)
  Max Work-item Per CU:    1024(0x400)
  Grid Max Size:           4294967295(0xffffffff)
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)
    y                        4294967295(0xffffffff)
    z                        4294967295(0xffffffff)
  Max fbarriers/Workgrp:   32
  Pool Info:
    Pool 1
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED
      Size:                    8372224(0x7fc000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 2
      Segment:                 GLOBAL; FLAGS:
      Size:                    8372224(0x7fc000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 3
      Segment:                 GROUP
      Size:                    64(0x40) KB
      Allocatable:             FALSE
      Alloc Granule:           0KB
      Alloc Alignment:         0KB
      Accessible by all:       FALSE
  ISA Info:
    ISA 1
      Name:                    amdgcn-amd-amdhsa--gfx1032
      Machine Models:          HSA_MACHINE_MODEL_LARGE
      Profiles:                HSA_PROFILE_BASE
      Default Rounding Mode:   NEAR
      Default Rounding Mode:   NEAR
      Fast f16:                TRUE
      Workgroup Max Size:      1024(0x400)
      Workgroup Max Size per Dimension:
        x                        1024(0x400)
        y                        1024(0x400)
        z                        1024(0x400)
      Grid Max Size:           4294967295(0xffffffff)
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)
        y                        4294967295(0xffffffff)
        z                        4294967295(0xffffffff)
      FBarrier Max Size:       32
*******
Agent 3
*******
  Name:                    gfx1035
  Uuid:                    GPU-XX
  Marketing Name:          AMD Radeon Graphics
  Vendor Name:             AMD
  Feature:                 KERNEL_DISPATCH
  Profile:                 BASE_PROFILE
  Float Round Mode:        NEAR
  Max Queue Number:        128(0x80)
  Queue Min Size:          64(0x40)
  Queue Max Size:          131072(0x20000)
  Queue Type:              MULTI
  Node:                    2
  Device Type:             GPU
  Cache Info:
    L1:                      16(0x10) KB
    L2:                      2048(0x800) KB
  Chip ID:                 5761(0x1681)
  ASIC Revision:           2(0x2)
  Cacheline Size:          64(0x40)
  Max Clock Freq. (MHz):   2400
  BDFID:                   1792
  Internal Node ID:        2
  Compute Unit:            12
  SIMDs per CU:            2
  Shader Engines:          1
  Shader Arrs. per Eng.:   2
  WatchPts on Addr. Ranges:4
  Features:                KERNEL_DISPATCH
  Fast F16 Operation:      TRUE
  Wavefront Size:          32(0x20)
  Workgroup Max Size:      1024(0x400)
  Workgroup Max Size per Dimension:
    x                        1024(0x400)
    y                        1024(0x400)
    z                        1024(0x400)
  Max Waves Per CU:        32(0x20)
  Max Work-item Per CU:    1024(0x400)
  Grid Max Size:           4294967295(0xffffffff)
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)
    y                        4294967295(0xffffffff)
    z                        4294967295(0xffffffff)
  Max fbarriers/Workgrp:   32
  Pool Info:
    Pool 1
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED
      Size:                    524288(0x80000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 2
      Segment:                 GLOBAL; FLAGS:
      Size:                    524288(0x80000) KB
      Allocatable:             TRUE
      Alloc Granule:           4KB
      Alloc Alignment:         4KB
      Accessible by all:       FALSE
    Pool 3
      Segment:                 GROUP
      Size:                    64(0x40) KB
      Allocatable:             FALSE
      Alloc Granule:           0KB
      Alloc Alignment:         0KB
      Accessible by all:       FALSE
  ISA Info:
    ISA 1
      Name:                    amdgcn-amd-amdhsa--gfx1035
      Machine Models:          HSA_MACHINE_MODEL_LARGE
      Profiles:                HSA_PROFILE_BASE
      Default Rounding Mode:   NEAR
      Default Rounding Mode:   NEAR
      Fast f16:                TRUE
      Workgroup Max Size:      1024(0x400)
      Workgroup Max Size per Dimension:
        x                        1024(0x400)
        y                        1024(0x400)
        z                        1024(0x400)
      Grid Max Size:           4294967295(0xffffffff)
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)
        y                        4294967295(0xffffffff)
        z                        4294967295(0xffffffff)
      FBarrier Max Size:       32
*** Done ***

Additional Information

Kernel 6.6.13, Clang 17.0.6, GCC 13.2.1_p20240113-r1, the GPU selection was just the one that seemed closest to the 6700S.

doctorcolinsmith commented 8 months ago

We will address the warnings found here. @evetsso will follow up on ways to reduce build time.

evetsso commented 8 months ago

@jmcelroy01 It looks like the long build time is in rocFFT as opposed to hipFFT. Specifically, it looks like the time is spent in building a cache of kernels that are loaded at runtime. This cache is optional, though the default build enables it to speed up plan generation on common problem sizes. When rocFFT needs a kernel that is not in this cache, it will compile the kernel at runtime instead.

rocFFT in ROCm 5.7.1 does not expose a nice way to disable this build-time cache, but ROCm 6.1 will add a new ROCFFT_KERNEL_CACHE_ENABLE CMake option to allow this. See https://github.com/ROCm/rocFFT/pull/443.

This PR originally came from Fedora people, so it's plausible that a distribution like Gentoo would also want to use the same option when it becomes available.

Another potential mitigation is to pass a smaller list of targets to AMDGPU_TARGETS when you run CMake. In your case, you have gfx1035 hardware, so you could pass -DAMDGPU_TARGETS=gfx1035. This would be suitable if you are building and running rocFFT for yourself on your own hardware, but rocFFT would spend more time compiling kernels at runtime if the resulting binary is run on different hardware.

evetsso commented 7 months ago

The warnings have been addressed with 7240ea1838f3bb367aff2fd6a0dd70411987fdb0.

Some mechanisms to reduce build time have been mentioned already, so I will close this issue. Please feel free to comment and/or reopen it if you want to continue the discussion.