New paste Repaste Download
htpc@htpc:~% python
Python 3.13.5 (main, Jun 21 2025, 09:35:00) [GCC 15.1.1 20250425] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyopencl as cl
... platforms = cl.get_platforms()
... devices = platforms[0].get_devices(device_type=cl.device_type.GPU)
... ctx = cl.Context(devices)
... mf = cl.mem_flags
...
... gpu_buffers=[]
... for i in range(140):
...     buffer_size_bytes = 1 * 1024 * 1024 * 1024
...     gpu_buffers.append(cl.Buffer(ctx, mf.READ_WRITE, size=buffer_size_bytes))
...     print(f"{i}GB")
...     
0GB
1GB
2GB
3GB
4GB
5GB
6GB
7GB
8GB
9GB
10GB
11GB
12GB
13GB
14GB
15GB
16GB
17GB
18GB
19GB
20GB
21GB
22GB
23GB
24GB
25GB
26GB
27GB
28GB
29GB
30GB
31GB
32GB
33GB
34GB
35GB
36GB
37GB
38GB
39GB
40GB
41GB
42GB
43GB
44GB
45GB
46GB
47GB
48GB
49GB
50GB
51GB
52GB
53GB
54GB
55GB
56GB
57GB
58GB
59GB
60GB
61GB
62GB
63GB
64GB
65GB
66GB
67GB
68GB
69GB
70GB
71GB
72GB
73GB
74GB
75GB
76GB
77GB
78GB
79GB
80GB
81GB
82GB
83GB
84GB
85GB
86GB
87GB
88GB
89GB
90GB
91GB
92GB
93GB
94GB
95GB
96GB
97GB
98GB
99GB
100GB
101GB
102GB
103GB
104GB
105GB
106GB
107GB
108GB
109GB
110GB
111GB
112GB
113GB
114GB
115GB
116GB
117GB
118GB
119GB
120GB
Traceback (most recent call last):
  File "<python-input-0>", line 10, in <module>
    gpu_buffers.append(cl.Buffer(ctx, mf.READ_WRITE, size=buffer_size_bytes))
                       ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyopencl._cl.MemoryError: create_buffer failed: MEM_OBJECT_ALLOCATION_FAILURE
>>>
Filename: None. Size: 2kb. View raw, , hex, or download this file.

This paste expires on 2025-08-15 06:04:44.117620. Pasted through web.