学习使用CUDA GPU极大地加快Python代码的速度。



学习使用CUDA GPU极大地加快Python代码的速度。 教程:https://noahgift.github.io/cloud-data-analysis-at-scale/topics/end-of-moores-law.html图书:http://leanpub.com/cloud4data/c/r95ekliOIvc9。

7 comments
  1. Nice demo – I am getting into CUDA GPU programming and have a workstation build with a 1950x 16 core CPU and two rtx 2080ti gpus and would like to check this demo on the machine and observe the outcome results without using colab definitely will check this out today. By the way , with notebook python3 environment , I need to use pip to install numba library as shown or do i have to create a new virtal environemnt? I am curious about that. Thank you

  2. So the cuda was 7X faster. Nice laptops have had 6-8 cores for many years now, so this GPU implementation is still no faster than multi-core parallelization. I have yet to see one article or one video where the GPU actually creates a performance improvement over njit, prange, multiprocessing, etc. 🙁

  3. I tried to follow this on my Windows 10 machine. The function you call as at 7:16 is still create_fractal() and not mandel_kernel() so I don't see why it is faster. When I changed it to mandel_kernel(), it complained that I hat to provide a launch configuration, telling the gpu how many grids and blocks to create. I added it like so (First properly setting a grid and block variable): mandel_kernel[grid, block](-2.0, 1.0, -1.0, 1.0, image, 20). It then worked and really was nearly 100x faster than the jit version.

Comments are closed.