Skip to content

SPECTGPU:starting point; created SPECTGPU_projector folder and schel… - #1687

Open
danieldeidda wants to merge 11 commits into
UCL:masterfrom
danieldeidda:GPUSPECT
Open

SPECTGPU:starting point; created SPECTGPU_projector folder and schel…#1687
danieldeidda wants to merge 11 commits into
UCL:masterfrom
danieldeidda:GPUSPECT

Conversation

@danieldeidda

Copy link
Copy Markdown
Collaborator

…eton classe, atm a lot of copy from niftyGPU

Changes in this pull request

Testing performed

Related issues

Checklist before requesting a review

  • [] I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • [] The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

Contribution Notes

Please tick the following:

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in STIR (the Work) under the terms and conditions of the Apache-2.0 License.
  • I (or my institution) have signed the STIR Contribution License Agreement (not required for small changes).

danieldeidda and others added 9 commits March 4, 2026 17:01
…calls the kernels; we need to double check that the kernel can write into the sino but probably we need to dodevice_to_host(stir_sino,cuda_array_created_by_forward)
… that calls the kernels; we need to double check that the kernel can write into the sino but probably we need to dodevice_to_host(stir_sino,cuda_array_created_by_forward)
Comment on lines +123 to +124
float* dev_image;
cudaMalloc(&dev_image, stir_image.size_all() * sizeof(float));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could use

CuVec<float> dev_image(stir_image.size_all());

then you don't need to free at the end. If so, you can pass it to a kernel as dev_image.data().

Also, you probably want to have this out of the loop.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ignoring Cuvec for now

@KrisThielemans
KrisThielemans marked this pull request as draft March 23, 2026 15:46
@KrisThielemans KrisThielemans self-assigned this Mar 23, 2026
addition of wrappers for actual_FP/BP
removal of most of helper
currently FP and BP work pretty well and are very close to spectUB rough speed estimate on debug mode were: SPECTUB 3min36s SPECTGPU 20s
3x3x3 gaussian kernel was fine for FP but introduced holes artifact in BP it was necessary to change the kernel to a 5x5x7 with sigma 2 to make a BPimage very close to SPECTUB. Speed above is related to 5x5x7.
addition of wrappers for actual_FP/BP
removal of most of helper
currently FP and BP work pretty well and are very close to spectUB rough speed estimate on debug mode were: SPECTUB 3min36s SPECTGPU 20s
3x3x3 gaussian kernel was fine for FP but introduced holes artifact in BP it was necessary to change the kernel to a 5x5x7 with sigma 2 to make a BPimage very close to SPECTUB. Speed above is related to 5x5x7.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 48 complexity · 13 duplication

Metric Results
Complexity 48
Duplication 13

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@danieldeidda
danieldeidda marked this pull request as ready for review September 9, 2026 17:28
@danieldeidda

Copy link
Copy Markdown
Collaborator Author
image the forward projction of a 150x150x200 image into a sino of 150, 80, 200 (tg,view,ax) values are pretty much identical.

the back projection on the other hand shows some scaling factor which I suppose we expect?
image

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.

4 participants