I am a beginner in need of help. I am learning OpenCL and trying run some python code on the GPU. The code runs fine on CPU but it takes days. I want to run that code on my AMD GPU (RX580 8Gb).
This is the Python code:
import numpy as np
num = 0; nummax = 0
while num <= 44:
n = np.random.randint(low=1, high=51, size=(9,5))
num = len(np.unique(n))
if num > nummax: nummax = num
print(nummax, n, sep='\n')
What I have already tried?
I have successfully run the python code on one CPU core and also using all CPU Core (with Numba ROCm) but could not run it on GPU
First I have spent some time learning Python Numba with no success (because my code need numpy.random.randint and Numba does not have full implementation, only partial)
then I have spent some time learning pyopencl on Hands On OpenCL by HandsOnOpenCL studying the examples and solutions but, I must confess, could not implement my simple code but i can run all OpenCL code of the examples and exercises (that means my OpenCL software and hardware are correctly installed and configured to run OpenCL code).
What hardware/software I have:
uname -a : Linux rig1 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux