Skip to content

COMP: Fix GPU modules PrintSelf compiler errors#3928

Merged
dzenanz merged 5 commits intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixGPUPrintSelfCompilerErrors
Feb 23, 2023
Merged

COMP: Fix GPU modules PrintSelf compiler errors#3928
dzenanz merged 5 commits intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixGPUPrintSelfCompilerErrors

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

@jhlegarreta jhlegarreta commented Feb 15, 2023

  • COMP: Restore PrintSelf in itkGPUPDEDeformableRegistrationFilter.h
  • COMP: Provide prefix-less member name to itkPrintSelfObjectMacro
  • COMP: Fix boolean member print statement in itk::GPUDataManager
  • ENH: Provide printing ability to time resource classes
  • COMP: Add Superclass alias to GPUGradientAnisotropicDiffusionImageFilter

PR Checklist

@github-actions github-actions Bot added type:Compiler Compiler support or related warnings area:Registration Issues affecting the Registration module labels Feb 15, 2023
@github-actions github-actions Bot added the area:Core Issues affecting the Core module label Feb 15, 2023
@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Feb 15, 2023

I am building locally. The commit I pushed was an obvious fix which I did before providing you the rest of the errors.

@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Feb 15, 2023

Output-Build.txt
4 projects failed to build now. I think this is less.

@jhlegarreta
Copy link
Copy Markdown
Member Author

I am building locally.

Will fail if you do not comment TimeProbe object instance serialization in itkGPUFiniteDifferenceImageFilter.hxx. I will propose adding printing capabilities in a new commit within this PR if we are sure it is definitely an ovesight.

@jhlegarreta jhlegarreta force-pushed the FixGPUPrintSelfCompilerErrors branch from 6f7a807 to 024bb14 Compare February 16, 2023 01:17
@jhlegarreta
Copy link
Copy Markdown
Member Author

Will fail if you do not comment TimeProbe object instance serialization in itkGPUFiniteDifferenceImageFilter.hxx. I will propose adding printing capabilities in a new commit within this PR if we are sure it is definitely an ovesight.

@dzenanz Please test locally when you have time. We may need to change

 os << indent << "InitTime: " << static_cast<typename NumericTraits<TimeProbe>::PrintType>(m_InitTime) << std::endl;
 os << indent
 os << "ComputeUpdateTime: " << static_cast<typename NumericTraits<TimeProbe>::PrintType>(m_ComputeUpdateTime)
    << std::endl;
 os << indent << "ApplyUpdateTime: " << static_cast<typename NumericTraits<TimeProbe>::PrintType>(m_ApplyUpdateTime)
    << std::endl;
 os << indent << "SmoothFieldTime: " << static_cast<typename NumericTraits<TimeProbe>::PrintType>(m_SmoothFieldTime)
    << std::endl;

to

m_InitTime.Prin(os, indent);
m_ComputeUpdateTime.Print(os, indent);
m_ApplyUpdateTime.Print(os, indent);
m_SmoothFieldTime.Print(os, indent);

but I want to see if that is strictly necessary.

@jhlegarreta jhlegarreta force-pushed the FixGPUPrintSelfCompilerErrors branch from 024bb14 to 7e97e85 Compare February 16, 2023 13:39
Comment thread Modules/Core/Common/include/itkResourceProbe.h Outdated
@jhlegarreta jhlegarreta force-pushed the FixGPUPrintSelfCompilerErrors branch from 7e97e85 to 3c6c357 Compare February 16, 2023 18:33
@github-actions github-actions Bot added type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Filtering Issues affecting the Filtering module labels Feb 17, 2023
@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Feb 17, 2023

My last commit makes it compile cleanly, but 3 tests now fail:

itkGPUGradientAnisotropicDiffusionImageFilterTest2D (Failed)
itkGPUGradientAnisotropicDiffusionImageFilterTest3D (Failed)
itkGPUDemonsRegistrationFilterTest2 (SEGFAULT)

I will look into it next week, unless someone else takes a look over the weekend.

@jhlegarreta
Copy link
Copy Markdown
Member Author

My last commit makes it compile cleanly,

Thanks @dzenanz 💯. Sorry for not having addressed all.

but 3 tests now fail:
I will look into it next week, unless someone else takes a look over the weekend.

I will not be able to look into this.

@dzenanz dzenanz force-pushed the FixGPUPrintSelfCompilerErrors branch from c029d5d to 3d80bac Compare February 20, 2023 17:01
@dzenanz
Copy link
Copy Markdown
Member

dzenanz commented Feb 20, 2023

The latest force-push fixes all test errors for me. Feel free to merge this into other commits, or otherwise reorganize PR.

jhlegarreta and others added 5 commits February 20, 2023 13:22
Restore the `PrintSelf` method override in
`itkGPUPDEDeformableRegistrationFilter.h`.

Fixes:
```
GPUPDEDeformableRegistrationFilterKernel.cxx
Modules\Registration\GPUPDEDeformable\include\itkGPUPDEDeformableRegistrationFilter.hxx(78,104):
error C2995:
'void itk::GPUDenseFiniteDifferenceImageFilter<TInputImage,TOutputImage,TParentImageFilter>::PrintSelf(std::ostream &,itk::Indent) const':
function template has already been defined
Modules\Core\GPUFiniteDifference\include\itkGPUDenseFiniteDifferenceImageFilter.h(105):
message : see declaration of
'itk::GPUDenseFiniteDifferenceImageFilter<TInputImage,TOutputImage,TParentImageFilter>::PrintSelf'
Modules\Registration\GPUPDEDeformable\include\itkGPUPDEDeformableRegistrationFilter.hxx(118,1):
error C2977:
'itk::GPUDenseFiniteDifferenceImageFilter<TInputImage,TOutputImage,TParentImageFilter>':
too many template arguments
```

Removed inadvertently in commit c44f9c1.

Fix the associated compilation errors in the `PrintSelf` method
implementation.
Provide prefix-less member name as the argument to the
`itkPrintSelfObjectMacro` macro in
`itkGPUPDEDeformableRegistrationFilter.hxx`.

Introduced inadvertently in commit c47ed1c.
Fix boolean member print statement in `itk::GPUDataManager`: add missing
opening parenthesis.

Missed inadvertently in commit c47ed1c.
Provide with printing ability to time resource classes.

Fixes:
```
Modules\Core\GPUFiniteDifference\include\itkGPUFiniteDifferenceImageFilter.hxx(298,1):
error C2679:
binary '<<': no operator found which takes a right-hand operand of type 'itk::TimeProbe' (or there is no acceptable conversion)
```
Provide with the `Superclass` type alias to
`itk::GPUGradientAnisotropicDiffusionImageFilter`.

Exercise the basic object methods.
@jhlegarreta jhlegarreta force-pushed the FixGPUPrintSelfCompilerErrors branch from 3d80bac to b3139d1 Compare February 20, 2023 18:45
@jhlegarreta
Copy link
Copy Markdown
Member Author

The latest force-push fixes all test errors for me. Feel free to merge this into other commits, or otherwise reorganize PR.

Done. Thanks @dzenanz 💯.

@jhlegarreta
Copy link
Copy Markdown
Member Author

/azp run ITK.macOS

@jhlegarreta
Copy link
Copy Markdown
Member Author

/azp run ITK.Linux

@dzenanz dzenanz merged commit 296db6a into InsightSoftwareConsortium:master Feb 23, 2023
@jhlegarreta jhlegarreta deleted the FixGPUPrintSelfCompilerErrors branch February 23, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Registration Issues affecting the Registration module type:Compiler Compiler support or related warnings type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants