Skip to content

Update to support TIGRE v3#2317

Draft
gfardell wants to merge 11 commits into
TomographicImaging:masterfrom
gfardell:tigre_v3
Draft

Update to support TIGRE v3#2317
gfardell wants to merge 11 commits into
TomographicImaging:masterfrom
gfardell:tigre_v3

Conversation

@gfardell
Copy link
Copy Markdown
Member

@gfardell gfardell commented Apr 29, 2026

Changes

Support for TIGRE 3.1.3.
Conda packages built and on anaconda.

ToDo:
Update in support table
Mark package as main
Update environment files

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc

Related issues/links

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers

@gfardell gfardell requested a review from a team as a code owner April 29, 2026 16:20
@gfardell gfardell marked this pull request as draft April 29, 2026 16:33
@casperdcl
Copy link
Copy Markdown
Member

casperdcl commented Apr 30, 2026

I suspect a problem with https://github.com/TomographicImaging/TIGRE-conda. Perhaps:

  • we need to increase the nvidia channel priority (iirc the conda-forge cuda libs don't work with tigre)
  • or we should simply have tigre & cuda statically linked?

@JeppeKlitgaard any thoughts?

@JeppeKlitgaard
Copy link
Copy Markdown
Contributor

JeppeKlitgaard commented Apr 30, 2026

I suspect a problem with https://github.com/TomographicImaging/TIGRE-conda. Perhaps:

  • we need to increase the nvidia channel priority (iirc the conda-forge cuda libs don't work with tigre)
  • or we should simply have tigre & cuda statically linked?

@JeppeKlitgaard any thoughts?

I am a bit puzzled that the (3.10, 1.23) AND (3.12, 1.26) both work just fine, but somehow (3.11, 1.25) does not? Never mind, only (3.12, 1.26) actually tests CUDA!

I think some CUDA-based libraries do statically link it, but that seems like quite a cumbersome solution?

Is this just related to the runner not having CUDA installed? It could be related to the change to CUDA 0.12, which I guess is new in TIGREv3?

I suspect the runner might have an older, incompatible CUDA installed (0.10, 0.11?), which I guess was fine for TIGREv2

@casperdcl
Copy link
Copy Markdown
Member

casperdcl commented Apr 30, 2026

The runner has Driver Version: 580.126.09 (and CUDA Version: 13.0 though this shouldn't matter since conda should install the correct cuda toolkit for tigre).

@JeppeKlitgaard
Copy link
Copy Markdown
Contributor

I am a bit pressed for time at the moment, but in a few weeks that should clear up. I can try and see if I can get TIGRE-conda to build locally on a machine with CUDA 13 and a recent driver, though that was already done as part of the PR that changed over the build system.

It might be difficult to debug without access to the runner, if it does turn out that it is related to the configuration there.

@lauramurgatroyd
Copy link
Copy Markdown
Member

The 'conda-test' action is currently getting tigre: 2.6-np123py310_0 ccpi

This is because the dev channel hasn't been added in the action - I will do this

@lauramurgatroyd
Copy link
Copy Markdown
Member

lauramurgatroyd commented May 7, 2026

I have now updated so that all of the actions get the correct version of tigre: 3.1.3.

We should be able to import tigre whether we have cuda or not, and at the moment we are unable to import tigre on runners with or without cuda. So something is wrong with the build in that regard.


Docs action: this runs on a runner without GPU, however it should still be able to import the tigre codes and render them (as is done on master - docs rendered from master can be seen here:

https://tomographicimaging.github.io/CIL/nightly/plugins/#tigre

On this branch Tigre has been installed in the docs environment:
https://github.com/TomographicImaging/CIL/actions/runs/25121210631/job/73622135939?pr=2317#step:5:1451

However, the documentation for tigre does not render:
image

This is because it gets this issue on import:
https://github.com/TomographicImaging/CIL/actions/runs/25499785025/job/74829166123#step:10:334

Example of a run on master: https://github.com/TomographicImaging/CIL/actions/runs/25448205768


Conda-test: This is runs on a system without a GPU

We have errors with tests using tigre:
e.g.
test_PluginsTigre_FBP
ImportError: libcudart.so.12: cannot open shared object file: No such file or directory
https://github.com/TomographicImaging/CIL/actions/runs/25502156025/job/74838763248?pr=2317#step:6:3139

On master, this test is skipped in conda-test:
test_FBP (test_PluginsTigre_FBP.Test_Cone2D_FBP_tigre) ... skipped 'Requires TIGRE GPU'
https://github.com/TomographicImaging/CIL/actions/runs/25489114378/job/74794042165

I think on this branch, it fails on the tigre import before it even checks if it should be skipped:

import unittest
from utils_projectors import TestCommon_FBP_SIM
from utils import has_tigre, has_nvidia, initialise_tests
initialise_tests()
if has_tigre:
from cil.plugins.tigre import FBP
def setup_parameters(self):
self.backend = 'tigre'
self.FBP = FBP
self.FBP_args={}
@unittest.skipUnless(has_tigre and has_nvidia, "Requires TIGRE GPU")

@lauramurgatroyd
Copy link
Copy Markdown
Member

Note: the test actions pass because they do not install tigre
https://github.com/TomographicImaging/CIL/actions/runs/25502156025/job/74838763248?pr=2317#step:3:2

@casperdcl casperdcl mentioned this pull request May 8, 2026
2 tasks
@lauramurgatroyd
Copy link
Copy Markdown
Member

The docs issue was resolved by #2323

@JeppeKlitgaard
Copy link
Copy Markdown
Contributor

JeppeKlitgaard commented May 8, 2026

I am happy to take a stab at trying to figure out whether this is related to the new TIGRE v3 builds made in https://github.com/TomographicImaging/TIGRE-conda, but it might take me couple of weeks before I have time to commit to this.

Thoughts:

The fact that this seemed also to be happening while the dependency was being resolved to TIGRE 2.6 might suggest that it is not related to the new TIGRE-conda builds.

The lack of a CUDA binary suggests something is off in the build system (either a lack of a dependency, or perhaps this should be declared via TIGRE-conda and fetched automatically?)

@lauramurgatroyd
Copy link
Copy Markdown
Member

Hi @JeppeKlitgaard thank you very much for the offer to take a look, but we're trying to release very soon so we'll take a look at it before then.

The actions that were still on tigre 2.6 were passing - so the issue is only happening with this latest tigre version.

@JeppeKlitgaard
Copy link
Copy Markdown
Contributor

Hi @JeppeKlitgaard thank you very much for the offer to take a look, but we're trying to release very soon so we'll take a look at it before then.

The actions that were still on tigre 2.6 were passing - so the issue is only happening with this latest tigre version.

Sorry, I misunderstood the problem in that case.

I can try and see if I can get the tigre build to install on a Linux machine with CUDA tomorrow to help pin down whether it is related to the packaging or environment.

Wednesday next week I would be able to take a more in-depth look if it hasn't been resolved by then?

Let me know if this would be helpful at all - I understand this may be too late for the release schedule

@casperdcl
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants