Open zhusihan-python opened 1 year ago
None of your images have uploaded properly.
None of your images have uploaded properly.
sor, i have updated the images
@zhusihan-python thanks for the report.
i can build itk montage using cufft acclerated itk
We are finalizing itk-5.3.0, at which time we will build packages for itk-montage but also itk-vkfftbackend, which provides GPU acceleration and you will be able to pip install both.
It looks like the problem is that GPU filters are not wrapped for Python. I guess that Matt's suggested solution is easier.
It looks like the problem is that GPU filters are not wrapped for Python. I guess that Matt's suggested solution is easier.
Sir dzenaz, i tried to set wrap_python to OFF, still got the same error, i notice that the tag 5.3.0 is released yesterday, i tried on this tag, got the same build warnings and errors too, just FYI.
referenced in function _wrap_itkFFTWFFTImageFilterInitFactory_RegisterOneFactory
This is clearly Python-related. Did you turn off ITK_WRAP_PYTHON
?
Also possibly look at https://github.com/InsightSoftwareConsortium/ITK/issues/1809#issuecomment-628696627.
with ITK_WRAP_PYTHON OFF, ITK_USE_GPU ON, ITK_USE_CUFFTW ON got errors as below:
471>FFTImageFilterFourierDomainFiltering.obj : error LNK2001: unresolved external symbol "void __cdecl itk::FFTWFFTImageFilterInitFactoryRegister__Private(void)" (?FFTWFFTImageFilterInitFactoryRegister__Private@itk@@YAXXZ) 471>F:\build_itk\bin\Release\FFTImageFilterFourierDomainFiltering.exe : fatal error LNK1120: 1 unresolved externals 472>FFTImageFilter.obj : error LNK2001: unresolved external symbol "void __cdecl itk::FFTWFFTImageFilterInitFactoryRegister__Private(void)" (?FFTWFFTImageFilterInitFactoryRegister__Private@itk@@YAXXZ) 472>F:\build_itk\bin\Release\FFTImageFilter.exe : fatal error LNK1120: 1 unresolved externals 471>Done building project "FFTImageFilterFourierDomainFiltering.vcxproj" -- FAILED. 492>------ Build started: Project: DeformableRegistration7, Configuration: Release x64 ------ 473>FFTDirectInverse2.obj : error LNK2001: unresolved external symbol "void __cdecl itk::FFTWFFTImageFilterInitFactoryRegister__Private(void)" (?FFTWFFTImageFilterInitFactoryRegister__Private@itk@@YAXXZ) 473>F:\build_itk\bin\Release\FFTDirectInverse2.exe : fatal error LNK1120: 1 unresolved externals 491>E:\projects\ITK\Modules\Filtering\Smoothing\include\itkRecursiveGaussianImageFilter.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 491>E:\projects\ITK\Modules\Filtering\ImageFilterBase\include\itkRecursiveSeparableImageFilter.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 473>Done building project "FFTDirectInverse2.vcxproj" -- FAILED. 493>------ Build started: Project: DeformableRegistration6, Configuration: Release x64 ------ 472>Done building project "FFTImageFilter.vcxproj" -- FAILED.
486>DicomPrintPatientInformation.vcxproj -> F:\build_itk\bin\Release\DicomPrintPatientInformation.exe 474>FFTDirectInverse.obj : error LNK2001: unresolved external symbol "void cdecl itk::FFTWFFTImageFilterInitFactoryRegisterPrivate(void)" (?FFTWFFTImageFilterInitFactoryRegister__Private@itk@@YAXXZ) 497>------ Build started: Project: DeformableRegistration2, Configuration: Release x64 ------ 474>F:\build_itk\bin\Release\FFTDirectInverse.exe : fatal error LNK1120: 1 unresolved externals 492>DeformableRegistration7.cxx 497>Building Custom Rule E:/projects/ITK/Examples/RegistrationITKv4/CMakeLists.txt 477>EllipseSpatialObject.vcxproj -> F:\build_itk\bin\Release\EllipseSpatialObject.exe 474>Done building project "FFTDirectInverse.vcxproj" -- FAILED.
then add ITK_USE_FFTWD_DEFAULT ON, ITK_USE_FFTWF_DEFAULT ON, ITK_USE_SYSTEM_FFTW_DEFAULT ON build success.
with ITK_WRAP_PYTHON ON still got errors.
branch master [commit](https://github.com/InsightSoftwareConsortium/ITK/commit/935533fbcbb451f32038c4643843a0bc606123ca)
MKL and cuFFT impersonate FFTW, so ITK_USE_FFTWD_DEFAULT ON, ITK_USE_FFTWF_DEFAULT ON, ITK_USE_SYSTEM_FFTW_DEFAULT ON are needed as a side-effect of build-system simplification.
I don't remember whether Python is supposed to work with cuFFTW, or even just any GPU filters. @tbirdso and/or @thewtex might know.
@dzenanz yes, FFTW should work with Python. This does sound like a bug.
Interestingly, in attempting to reproduce with ITK_USE_SYSTEM_FFTW=ON
and ITK_USE_GPU=ON
on Linux I was able to build successfully but importing ITKFFT fails:
>>> import itk
>>> itk.auto_progress(2)
>>> itk.FFTWForwardFFTImageFilter
Loading ITKPyBase... done
Loading ITKCommon... done
Loading ITKStatistics... done
Loading ITKImageFilterBase... done
Loading ITKTransform... done
Loading ITKImageFunction... done
Loading ITKImageGrid... done
Loading ITKFFT... Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tom/builds/ITK-base-dev/Wrapping/Generators/Python/itk/support/lazy.py", line 138, in __getattribute__
base.itk_load_swig_module(module, namespace)
File "/home/tom/builds/ITK-base-dev/Wrapping/Generators/Python/itk/support/base.py", line 132, in itk_load_swig_module
l_module = loader.load(swig_module_name)
File "/home/tom/builds/ITK-base-dev/Wrapping/Generators/Python/itk/support/base.py", line 291, in load
l_spec.loader.exec_module(l_module) # pytype: disable=attribute-error
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/tom/builds/ITK-base-dev/Wrapping/Generators/Python/itk/support/../ITKFFTPython.py", line 13, in <module>
from . import _ITKFFTPython
ImportError: /home/tom/builds/ITK-base-dev/Wrapping/Generators/Python/itk/_ITKFFTPython.so: undefined symbol: _ZTIN3itk29FFTWFFTImageFilterInitFactoryE
update with ITK_WRAP_PYTHON ON, ITK_USE_GPU ON, ITK_USE_CUFFTW ON, ITK_USE_FFTWD_DEFAULT ON, ITK_USE_FFTWF_DEFAULT ON, ITK_USE_SYSTEM_FFTW_DEFAULT ON compile tag v5.2.1 success on windows 10 then build itk montage and montage examples success
@dzenanz should this be kept open? My understanding is the build passed for v5.2.1 but failed for v5.3.0.
@zhusihan-python can reopen if the issue was not fixed, and further clarify the problem if it is something other than "build passed for v5.2.1 but failed for v5.3.0".
Re-opening this issue, @zhusihan-python has confirmed in https://github.com/InsightSoftwareConsortium/ITKVkFFTBackend/issues/64 that the issue persists in ITK v5.3.0. Platform and build environment details are available in https://github.com/InsightSoftwareConsortium/ITKVkFFTBackend/issues/64.
build itk master on windows 10 cmake 3.23.1 vs 2022 cuda 11.8 got errors
Description
Steps to Reproduce
1、set option ITK_USE_GPU=ON ITK_USE_CUFFTW=ON in CmakeList.txt 2、configure cmake
got some warnings as below
all wrap_* has been turn on, still got the warnings, so i just ignore it and continue generate
Expected behavior
build successful, then i can build itk montage using cufft acclerated itk
Actual behavior
build failed
Reproducibility
Versions
master branch commit id 38696b2609884358af0d10b062213fcfc2ffcef1
Environment
windows 10 cmake 3.23.1 vs 2022 cuda 11.8 python 3.10.8
Additional Information