Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: PERF: Performance acceleration via GPU-accelerated FFT's #1331

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thewtex
Copy link

@thewtex thewtex commented Apr 6, 2022

Further discussion today at the ANTs Get Your Brain Straight BoF:

https://insightsoftwareconsortium.github.io/GetYourBrainStraight/HCK01_2022_Virtual/

To address:

/home/matt/src/ANTs/Examples/PrintHeader.cxx: In function ‘int ants::PrintHeader(int, char**)’:
/home/matt/src/ANTs/Examples/PrintHeader.cxx:284:34: error: ‘ITK_COORDINATE_ORIENTATION_INVALID’ is not a member of ‘itk::SpatialOrientation’; did you mean ‘ITK_COORDINATE_ORIENTATION_IAL’?
  284 |         itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_INVALID;
@@ -38,7 +38,64 @@ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
message(STATUS "Building ${PROJECT_NAME} version \"${${PROJECT_NAME}_VERSION}\"")

# Set up ITK
find_package(ITK ${ITK_VERSION_ID} REQUIRED)
find_package(ITK ${ITK_VERSION_ID} REQUIRED
Copy link
Member

@cookpa cookpa Apr 6, 2022

Choose a reason for hiding this comment

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

This block breaks the default SuperBuild for me. It's asking for ITK components that aren't built by default:

VkFFTBackend
ITKFEM
ITKVTK
ITKVtkGlue

I don't know about ITKFEM, but the others should be required only if the relevant build options are turned on.

Copy link
Contributor

Choose a reason for hiding this comment

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

ITKFEM is because Temporary/ has includes which use it.

VkFFTBackend is the code which supports this new feature.

ITKVTK and ITKVTK need to be wrapped so they only are required if the USE_VTK is on.

I'm working on this

Copy link
Contributor

Choose a reason for hiding this comment

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

also Examples/ConformalMapping.cxx and Examples/ANTSConformalMapping.cxx but it appears these are not built, since ITKFEM module hasn't been enabled and the build still works.

Copy link
Member

Choose a reason for hiding this comment

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

I was working on this as well, but I could not build with vkFFT support. It stops with this error

make                                                                                                                                                                   
[ 47%] Built target ITKv5
[ 52%] Performing forcebuild step for 'ANTS'
[ 58%] Performing build step for 'ANTS'
[  1%] Building CXX object Examples/CMakeFiles/antsUtilities.dir/antsRegistrationTemplateHeader.cxx.o
In file included from /Users/pcook/tmp/NOT_BACKED_UP/antsGPU/ANTs/Examples/antsRegistrationTemplateHeader.cxx:1:
In file included from /Users/pcook/tmp/NOT_BACKED_UP/antsGPU/ANTs/Examples/antsRegistrationTemplateHeader.h:14:
In file included from /Users/pcook/tmp/NOT_BACKED_UP/antsGPU/ANTs/Examples/itkantsRegistrationHelper.h:1472:
In file included from /Users/pcook/tmp/NOT_BACKED_UP/antsGPU/ANTs/Examples/itkantsRegistrationHelper.hxx:7:
In file included from /Users/pcook/tmp/NOT_BACKED_UP/antsGPU/build/staging/include/ITK-5.3/itkVkHalfHermitianToRealInverseFFTImageFilter.h:24:
/Users/pcook/tmp/NOT_BACKED_UP/antsGPU/build/staging/include/ITK-5.3/itkVkCommon.h:24:10: fatal error: 'vkFFT.h' file not found
#include "vkFFT.h"
         ^~~~~~~~~
1 error generated.
make[5]: *** [Examples/CMakeFiles/antsUtilities.dir/antsRegistrationTemplateHeader.cxx.o] Error 1
make[4]: *** [Examples/CMakeFiles/antsUtilities.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [ANTS-prefix/src/ANTS-stamp/ANTS-build] Error 2
make[1]: *** [CMakeFiles/ANTS.dir/all] Error 2
make: *** [all] Error 2

Have you been able to compile with the vtFFT module on?

@@ -80,6 +80,11 @@ if(NOT DEFINED ${extProjName}_DIR AND NOT ${USE_SYSTEM_${extProjName}})
-DModule_ITKMINC:BOOL=ON
)
endif()
if(${extProjName}_BUILD_VKFFT_SUPPORT)
set(${proj}_MINC_ARGS
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be "${proj}_VKFFT_ARGS"

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't get to testing this build and fixing it up yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants