|
| 1 | +GPU Info |
| 2 | +******** |
| 3 | + |
| 4 | +FAQ |
| 5 | +--- |
| 6 | + |
| 7 | +1. Do I need a GPU? |
| 8 | + |
| 9 | +Technically no, you can perform limited software rendering on linux using lavapipe (see drivers link below). However |
| 10 | +``fastplotlib`` is intentionally built for realtime rendering using the latest GPU technologies, so we strongly |
| 11 | +recommend that you use a GPU. |
| 12 | + |
| 13 | +2. My kernel keeps crashing when I create visualizations. |
| 14 | + |
| 15 | +This can happen under the following circumstances: |
| 16 | + |
| 17 | +- You have ran out of GPU VRAM. |
| 18 | +- Driver issues (see next section). |
| 19 | + |
| 20 | +If you aren't able to solve it please post an issue on GitHub. :) |
| 21 | + |
| 22 | +Drivers |
| 23 | +------- |
| 24 | + |
| 25 | +See the README: https://github.com/fastplotlib/fastplotlib?tab=readme-ov-file#graphics-drivers |
| 26 | + |
| 27 | +If you notice weird graphic artifacts, things not rendering, or other glitches try updating to the latest stable |
| 28 | +drivers. |
| 29 | + |
| 30 | + |
| 31 | +View available GPU |
| 32 | +------------------ |
| 33 | + |
| 34 | +You can view all GPUs that are available to ``WGPU`` like this:: |
| 35 | + |
| 36 | + from wgpu.backends.wgpu_native import enumerate_adapters |
| 37 | + from pprint import pprint |
| 38 | + |
| 39 | + for adapter in enumerate_adapters(): |
| 40 | + pprint(adapter.request_adapter_info()) |
| 41 | + |
| 42 | +For example, on a Thinkpad AMD laptop with a dedicated nvidia GPU this returns:: |
| 43 | + |
| 44 | + {'adapter_type': 'IntegratedGPU', |
| 45 | + 'architecture': '', |
| 46 | + 'backend_type': 'Vulkan', |
| 47 | + 'description': 'Mesa 22.3.6', |
| 48 | + 'device': 'AMD Radeon Graphics (RADV REMBRANDT)', |
| 49 | + 'vendor': 'radv'} |
| 50 | + {'adapter_type': 'DiscreteGPU', |
| 51 | + 'architecture': '', |
| 52 | + 'backend_type': 'Vulkan', |
| 53 | + 'description': '535.129.03', |
| 54 | + 'device': 'NVIDIA T1200 Laptop GPU', |
| 55 | + 'vendor': 'NVIDIA'} |
| 56 | + {'adapter_type': 'CPU', |
| 57 | + 'architecture': '', |
| 58 | + 'backend_type': 'Vulkan', |
| 59 | + 'description': 'Mesa 22.3.6 (LLVM 15.0.6)', |
| 60 | + 'device': 'llvmpipe (LLVM 15.0.6, 256 bits)', |
| 61 | + 'vendor': 'llvmpipe'} |
| 62 | + {'adapter_type': 'Unknown', |
| 63 | + 'architecture': '', |
| 64 | + 'backend_type': 'OpenGL', |
| 65 | + 'description': '', |
| 66 | + 'device': 'AMD Radeon Graphics (rembrandt, LLVM 15.0.6, DRM 3.52, ' |
| 67 | + '6.4.0-0.deb12.2-amd64)', |
| 68 | + 'vendor': ''} |
| 69 | + |
| 70 | +GPU currently in use |
| 71 | +-------------------- |
| 72 | + |
| 73 | +If you want to know the GPU that a current plot is using you can check the adapter that the renderer is using:: |
| 74 | + |
| 75 | + # for example if we make a plot |
| 76 | + plot = fpl.Plot() |
| 77 | + plot.add_image(np.random.rand(100, 100)) |
| 78 | + plot.show() |
| 79 | + |
| 80 | + # GPU that is currently in use by the renderer |
| 81 | + plot.renderer.device.adapter.request_adapter_info() |
| 82 | + |
0 commit comments