Closed HannoSpreeuw closed 3 years ago
The exercise is to compute all prime numbers between 1 and 10000 on the CPU and GPU using Python code. Numba will compile it for the GPU.
Start off with Python code for finding all primes in a certain interval. You can find this code all over the web.
Time it. Add a jit(nopython=True) decorator and time again.
Use Numba's vectorize decorator for the GPU.
I just added some comments to the content.
I will merge it so we have everything written down for next week's pilot workshop. Work on the lesson itself will keep going in the future.
The exercise is to compute all prime numbers between 1 and 10000 on the CPU and GPU using Python code. Numba will compile it for the GPU.
Start off with Python code for finding all primes in a certain interval. You can find this code all over the web.
Time it. Add a jit(nopython=True) decorator and time again.
Use Numba's vectorize decorator for the GPU.