# Is it possible to use amd gpu on python

**URL:** <https://forum.opencv.org/t/is-it-possible-to-use-amd-gpu-on-python/10663>\
**Category:** Python\
**Created:** [October 24, 2022, 1:27pm UTC](https://forum.opencv.org/t/is-it-possible-to-use-amd-gpu-on-python/10663 "2022-10-24T13:27:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![voe](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@voe](https://forum.opencv.org/u/voe)\
**Post date:** [October 24, 2022, 1:27pm UTC](https://forum.opencv.org/t/is-it-possible-to-use-amd-gpu-on-python/10663/1 "2022-10-24T13:27:38Z")

</div>

I have tried to search how to install python with (amd) gpu support, but it seems that atleast pre builds only support cpu. Is this correct and how do I accelerate opencl functions with Umat and amd gpu?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [October 24, 2022, 3:01pm UTC](https://forum.opencv.org/t/is-it-possible-to-use-amd-gpu-on-python/10663/2 "2022-10-24T15:01:39Z")

</div>

AMD GPUs are supported through OpenCV’s ubiquitous OpenCL support (“transparent API”, cv.UMat)

just wrap a numpy array into a UMat, then pass the UMat to whatever OpenCV functions you need. any results have to be transferred back hostside using a `.get()` call, which gives you a numpy array.

all the `opencv-python` packages on PyPI support OpenCL.
