# python-itk: GPU 

**URL:** https://discourse.itk.org/t/python-itk-gpu/2707
**Category:** Uncategorized
**Created:** [February 12, 2020, 1:29pm UTC](https://discourse.itk.org/t/python-itk-gpu/2707 "2020-02-12T13:29:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![qiang-zhang-neu](https://discourse.itk.org/letter_avatar_proxy/v4/letter/q/e47774/32.png) [@qiang-zhang-neu](https://discourse.itk.org/u/qiang-zhang-neu)
#### Post date: [February 12, 2020, 1:29pm UTC](https://discourse.itk.org/t/python-itk-gpu/2707/1 "2020-02-12T13:29:18Z")

</div>

I want to use GPU based itk for image registration. I compile itk from source code, and the ITK\_USE\_GPU is set to ON. The compiling is OK.

The itk can be imported in python:

> > > import itk  
> > > itk.Image[itk.F, 3]  
> > > \<class ‘itkImagePython.itkImageF3’\>

However, when I want to use the GPU module, bug is reported:

> > > itk.GPUImage[itk.F, 3]  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > File “D:\Anaconda3\envs\ITK\_gpu\lib\site-packages\itkLazy.py”, line 48, in **getattribute**  
> > > value = types.ModuleType. **getattribute** (self, attr)  
> > > AttributeError: module ‘itk’ has no attribute ‘GPUImage’

How can I use the GPU in python-itk?

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [February 12, 2020, 4:17pm UTC](https://discourse.itk.org/t/python-itk-gpu/2707/2 "2020-02-12T16:17:36Z")

</div>

Experimental GPU wrapping support is available in ITK Git `master`.

Experimental binary GPU Python packages are available on Linux for [ITKElastix](https://github.com/InsightSoftwareConsortium/ITKElastix), installable with `pip install itk-elastix-opencl`.
