Skip to content

Conversation

@axel-grc
Copy link
Collaborator

No description provided.

@@ -41,7 +41,6 @@ itkCudaMemoryProbeTest(int, char *[])
double expectedKB = static_cast<double>(gpuBytes / 1024);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not just

double expectedKB = gpuBytes / 1024.;

? gpuBytes should be equal to 128³*4 so expectedKB is an integer anyway, 8192 kB. And if it weren't, this would not compute an accurate result, see here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes you are right, I will change that.

// numPixels * sizeof(float) / 1024 -> kB
size_t gpuBytes = img->GetCudaDataManager()->GetGPUBufferSize();
double expectedKB = static_cast<double>(gpuBytes / 1024);
double expectedKB = gpuBytes / 1024.0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails :-):
https://github.com/RTKConsortium/ITKCudaCommon/actions/runs/18468293321/job/52615624133#step:10:293
I only don't get one but you should convert the numerator to double to follow itk::CudaMemoryProbe:
https://github.com/RTKConsortium/ITKCudaCommon/blob/main/src/itkCudaMemoryProbe.cxx#L36
You can drop the last 0 by the way (but it's a style pref).

Copy link
Collaborator

Choose a reason for hiding this comment

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

It actually works after relaunching the failed workflows. It might have been something going on at the same time, maybe we should make sure this test is run alone if possible.

@SimonRit SimonRit merged commit 803bef0 into RTKConsortium:main Oct 13, 2025
13 of 15 checks passed
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.

2 participants