Open derUli opened 5 months ago
Hello and thank you for reporting this, I believe that this issue is related to the cupy-cuda version used (cupy-cuda12x 13.0.0) and possibly some changes around __syncthreads() I will have to reproduce this issue somehow and check.
In the mean time could you please run a small python program with the following lines to have more info about the GPU capabilities.
import PygameShader
from PygameShader.shader_gpu import block_grid, cartoon_gpu, \
get_gpu_info, block_and_grid_info
get_gpu_info()
You should get something similar to:
pygame 2.5.2 (SDL 2.28.3, Python 3.11.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
PygameShader version 1.0.10
OPENMP True
THREADS 16
SCHEDULE static
CUPY VERSION : 9.6.0
GPU MAX GRID PER BLOCK : 32
GPU FREE MEMORY : (mem=3513201460.000000, (3.272G))
GPU MAX MEMORY : (mem=4294705152.000000, (4.0G ))
GPU PCI BUS ID : (bus=0000:0F:00.0)
GPU CAPABILITY : (capa=61 )
Have you tried any of the GPU demo included in the directory DEMO
Do you have the same issue for all of them?
Kind Regards
pygame-ce 2.4.0 (SDL 2.28.5, Python 3.11.7)
PygameShader version 1.0.10
OPENMP True
THREADS 16
SCHEDULE static
CUPY VERSION : 13.0.0
GPU MAX GRID PER BLOCK : 32
GPU FREE MEMORY : (mem=1715581543.000000, (1.598G))
GPU MAX MEMORY : (mem=2147352576.000000, (2.0G ))
GPU PCI BUS ID : (bus=0000:01:00.0)
GPU CAPABILITY : (capa=61 )
Works:
Doesn't work
Traceback (most recent call last):
File "C:\Users\uli\Downloads\PygameShader-main\PygameShader\Demo\GPU_cartoon.py", line 99, in <module>
image = cartoon_gpu(
^^^^^^^^^^^^
File "PygameShader\\shader_gpu.pyx", line 2395, in PygameShader.shader_gpu.cartoon_gpu
File "PygameShader\\shader_gpu.pyx", line 2418, in PygameShader.shader_gpu.cartoon_gpu
File "PygameShader\\shader_gpu.pyx", line 2525, in PygameShader.shader_gpu.cartoon_cupy
ValueError:
Cannot reference source pixels into a 3d array.
a bytes-like object is required, not 'ndarray'
Hi,
I believe that this issue is the version of CUDA toolkit install with your graphic card NVIDIA GT 1030 The cupy-cuda12x library installed mean that you have at least CUDA toolkit version 12.0 or over if not (you need the correct cup-cuda version installed). Example cupy-cuda11x for CUDA version 11.X My card works perfectly with CUDA toolkit version10.2 to 11.2 and I have a GTX 1050 Ti and cupy version 13.0. When I use version 12.0 I start to have problems compiling the shaders. Check your graphic card driver version and check on the web the appropriate CUDA toolkit compatible with your driver. I hope this helps
Kind Regards
Describe the bug If I call the bloom_gpu method my game freezes for some seconds and then i get a RuntimeError.
To Reproduce Steps to reproduce the behavior:
surf is my display surface.
Expected behavior It should return a surface with the bloom effect applied.
Some maybe helpful details about my environment:
Windows 11 64-Bit GeForce GT 1030 (2GB VRAM) Python 3.11.6 pygame-ce 2.4.0 PygameShader 1.0.10 cupy-cuda12x 13.0.0