CIL icon indicating copy to clipboard operation
CIL copied to clipboard

don't force numpy

Open casperdcl opened this issue 2 years ago • 4 comments

drop things like asserting type(df) is numpy.ndarray so that end-users can switch to e.g. cupy

casperdcl avatar Dec 21 '23 11:12 casperdcl

See agnostic-DC and CIL-cupy but it is outdated

epapoutsellis avatar Dec 21 '23 12:12 epapoutsellis

#978 and #572 right :)

casperdcl avatar Dec 21 '23 12:12 casperdcl

I did some work on this https://github.com/TomographicImaging/CIL/pull/1126

I made such that the user could specify which backend for the DataContainer they want to use. It became a bit complicated at creation/copy time as the API of cupy and numpy are not entirely the same.

paskino avatar Jan 17 '24 13:01 paskino

I developed further and compared 4 different implementations of TV: Regularisation Toolkit FGP_TV, TotalVariation with backend C, NumPy and CuPy (new).

https://github.com/paskino/CIL/blob/cupy_array_copy/experiments/cupy_TV.py, see https://discord.com/channels/929016277266219038/936564472531795968/1210601876161175573

image

paskino avatar Jul 06 '24 21:07 paskino