diff options
-rw-r--r-- | python/astra/__init__.py | 3 | ||||
-rw-r--r-- | samples/python/s020_3d_multiGPU.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/python/astra/__init__.py b/python/astra/__init__.py index b73fff5..d5aac44 100644 --- a/python/astra/__init__.py +++ b/python/astra/__init__.py @@ -27,6 +27,7 @@ from . import matlab as m from .creators import astra_dict,create_vol_geom, create_proj_geom, create_backprojection, create_sino, create_reconstruction, create_projector,create_sino3d_gpu, create_backprojection3d_gpu from .functions import data_op, add_noise_to_sino, clear, move_vol_geom from .extrautils import clipCircle +from .astra import set_gpu_index, get_gpu_info from . import data2d from . import astra from . import data3d @@ -45,4 +46,4 @@ import os if 'ASTRA_GPU_INDEX' in os.environ: L = [ int(x) for x in os.environ['ASTRA_GPU_INDEX'].split(',') ] - astra.set_gpu_index(L) + set_gpu_index(L) diff --git a/samples/python/s020_3d_multiGPU.py b/samples/python/s020_3d_multiGPU.py index 11a1e11..e872870 100644 --- a/samples/python/s020_3d_multiGPU.py +++ b/samples/python/s020_3d_multiGPU.py @@ -28,11 +28,11 @@ import numpy as np # Set up multi-GPU usage. # This only works for 3D GPU forward projection and back projection. -astra.astra.set_gpu_index([0,1]) +astra.set_gpu_index([0,1]) # Optionally, you can also restrict the amount of GPU memory ASTRA will use. # The line commented below sets this to 1GB. -#astra.astra.set_gpu_index([0,1], memory=1024*1024*1024) +#astra.set_gpu_index([0,1], memory=1024*1024*1024) vol_geom = astra.create_vol_geom(1024, 1024, 1024) |