{"id":2620,"date":"2025-12-17T23:15:03","date_gmt":"2025-12-17T21:15:03","guid":{"rendered":"https:\/\/signal.eu.org\/blog\/?p=2620"},"modified":"2025-12-18T14:00:25","modified_gmt":"2025-12-18T12:00:25","slug":"running-ollama-on-a-amd-gpu-with-bhyve-freebsd","status":"publish","type":"post","link":"https:\/\/signal.eu.org\/blog\/2025\/12\/17\/running-ollama-on-a-amd-gpu-with-bhyve-freebsd\/","title":{"rendered":"Running ollama on a AMD GPU with bhyve\/FreeBSD"},"content":{"rendered":"\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=pbeyssac\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n\n<p>The purpose of the following post is to share my experience regarding running a recent AMD GPU (RX9060) to accelerate LLM inference in <a href=\"https:\/\/ollama.com\/\" data-type=\"URL\" data-id=\"https:\/\/ollama.com\/\">ollama<\/a>. It should also work with older or similar AMD GPUs such as the RX9070.<\/p>\n\n\n\n<p>Depending on your GPU, you may need FreeBSD 15.0, but this has a good chance to also work on FreeBSD 14.*. &#8220;Your mileage may vary&#8221;.<\/p>\n\n\n\n<p>However, make sure you have updated your system with the 16 December 2025 errata which fixes a bhyve passthru bug: <a href=\"https:\/\/www.freebsd.org\/security\/advisories\/FreeBSD-EN-25:20.vmm.asc\">https:\/\/www.freebsd.org\/security\/advisories\/FreeBSD-EN-25:20.vmm.asc<\/a>.<\/p>\n\n\n\n<p>Here&#8217;s the configuration I chose:<\/p>\n\n\n\n<ol>\n<li>A first debian13 instance in a bhyve VM for the front-end (open-webui)<\/li>\n\n\n\n<li>A second debian13 instance, also in a bhyve VM, for the ollama backend<\/li>\n<\/ol>\n\n\n\n<p>The purpose of this post is to detail how to install the second VM, which is the &#8220;hard and tedious&#8221; part.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check and fix BIOS settings for GPU passthru<\/h2>\n\n\n\n<p>The system BIOS must be set-up for:<\/p>\n\n\n\n<p><strong>IOMM, SVM and Decoding above 4G: enabled<\/strong><\/p>\n\n\n\n<p><strong>Resize BAR: disabled<\/strong><\/p>\n\n\n\n<p><strong>UEFI mode enabled, CSM disabled<\/strong><\/p>\n\n\n\n<p>(settings from <a href=\"https:\/\/xyinn.org\/blog\/freebsd\/freebsd_bhyve_gpu_passthrough_amd\">https:\/\/xyinn.org\/blog\/freebsd\/freebsd_bhyve_gpu_passthrough_amd<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prepare the host for GPU passthru<\/h2>\n\n\n\n<p>The GPU needs to be hidden away from the host system, and given to the bhyve guest, using the FreeBSD &#8220;<code>ppt<\/code>&#8221; module.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Locate the PCI ids for the GPU<\/h3>\n\n\n\n<p>Use <code>pciconf -lv<\/code> and look for the entries for your card. In my case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pcib2@pci0:1:0:0:       class=0x060400 rev=0x25 hdr=0x01 vendor=0x1002 device=0x1478 subvendor=0x1eae subdevice=0x1478\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 10 XL Upstream Port of PCI Express Switch'\n    class      = bridge\n    subclass   = PCI-PCI\npcib3@pci0:2:0:0:       class=0x060400 rev=0x25 hdr=0x01 vendor=0x1002 device=0x1479 subvendor=0x1002 subdevice=0x1479\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 10 XL Downstream Port of PCI Express Switch'\n    class      = bridge\n    subclass   = PCI-PCI\nvgapci0@pci0:3:0:0:     class=0x030000 rev=0xc0 hdr=0x00 vendor=0x1002 device=0x7590 subvendor=0x1eae subdevice=0x8601\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 44 &#91;Radeon RX 9060 XT]'\n    class      = display\n    subclass   = VGA\nhdac0@pci0:3:0:1:       class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0xab40 subvendor=0x1002 subdevice=0xab40\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 48 HDMI\/DP Audio Controller'\n    class      = multimedia\n    subclass   = HDA\n<\/code><\/pre>\n\n\n\n<p>Note the PCI ids (1:0:0, 2:0:0, 3:0:0, 3:0:1). Yours may vary. Note that they may vary also when adding\/removing cards from the system. My internal GPU from the Ryzen 5600G is at 3:0:0 &amp; al when no PCI GPU is present, and at 14:0:0 &amp; al when a PCI GPU. This caused a lot of grief during my tests.<\/p>\n\n\n\n<p>Disregard the first two entries (1:0:0 and 2:0:0: PCI bridges on the card), they need be left alone, or the other two entries will not be accessible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure the GPU passthru<\/h3>\n\n\n\n<p>In <code>\/boot\/loader.conf<\/code>, add passthru entries for the GPU and (optionally) the audio controller.<\/p>\n\n\n<pre class=\"block-editor-rich-text__editable rich-text\" style=\"white-space: pre-wrap; min-width: 1px;\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"Code\"><code><\/code><code>pptdevs=\"3\/0\/0 3\/0\/1\"<\/code><\/pre>\n\n\n<p>Alternatively, you can tweak passthru devices without rebooting, using the <code>devctl<\/code> command-line utility, then make the setting permanent using the above loader configuration.<\/p>\n\n\n\n<p>You also need the following in <code>\/boot\/loader.conf<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># bhyve virtual machine monitor\nvmm_load=\"YES\"\n\n# Enable AMD-Vi support \/ can only be tweaked at boot\nhw.vmm.amdvi.enable=\"1\"\n\n<\/code><\/pre>\n\n\n\n<p>Then reboot the host.<\/p>\n\n\n\n<p>Run <code>pciconf -lv<\/code> again to check the GPU now shows up as <code>ppt0<\/code>, <code>ppt1<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ppt0@pci0:3:0:0:\tclass=0x030000 rev=0xc0 hdr=0x00 vendor=0x1002 device=0x7590 subvendor=0x1eae subdevice=0x8601\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 44 &#91;Radeon RX 9060 XT]'\n    class      = display\n    subclass   = VGA\nppt1@pci0:3:0:1:\tclass=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0xab40 subvendor=0x1002 subdevice=0xab40\n    vendor     = 'Advanced Micro Devices, Inc. &#91;AMD\/ATI]'\n    device     = 'Navi 48 HDMI\/DP Audio Controller'\n    class      = multimedia\n    subclass   = HDA\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Create a vm-bhyve environment<\/h2>\n\n\n\n<p>For easier day-to-day use of <code>bhyve<\/code>, I recommend the <code>vm-bhyve<\/code> package. It provides a command line interface similar to <code>iocage<\/code> for jails.<\/p>\n\n\n\n<p><code>bhyve-firmware<\/code> enables UEFI boot in bhyve.<\/p>\n\n\n\n<p><code>tigervnc<\/code> will be used as a <a href=\"https:\/\/en.wikipedia.org\/wiki\/VNC\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/VNC\">VNC<\/a> client to install Linux in the guest VM (this in turn subtly enables the UEFI option in the Debian installer). Run the following:<\/p>\n\n\n<pre class=\"block-editor-rich-text__editable rich-text\" style=\"white-space: pre-wrap; min-width: 1px;\" role=\"textbox\" contenteditable=\"true\" aria-multiline=\"true\" aria-label=\"Code\"><code><\/code><code># pkg install vm-bhyve bhyve-firmware tigervnc-viewer<\/code><\/pre>\n\n\n<p>Then use the procedure documented in <code>man vm<\/code>. The following assumes the root path you chose for your <code>bhyve<\/code> environment is <code>\/vm<\/code>, which is the default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create and install a Debian VM<\/h2>\n\n\n\n<p>Fetch and install an image of your favorite Linux distribution. I chose a network installation of Debian13 (<a href=\"https:\/\/www.debian.org\/distrib\/netinst\">https:\/\/www.debian.org\/distrib\/netinst<\/a>).<\/p>\n\n\n\n<p>As you will install AMD ROCm later to make use of the GPU, you may prefer a distribution which is supported by the ROCm installation instructions (see <a href=\"https:\/\/rocm.docs.amd.com\/projects\/install-on-linux\/en\/latest\/install\/post-install.html\">https:\/\/rocm.docs.amd.com\/projects\/install-on-linux\/en\/latest\/install\/post-install.html<\/a>).<\/p>\n\n\n\n<p>Place the Linux boot image in <code>\/vm\/.iso\/<\/code>.<\/p>\n\n\n\n<p>I highly recommend using the &#8220;UEFI&#8221; boot mode for the VM instead of the &#8220;grub loader mode&#8221;, as this avoids tedious grub configuration and potential incompatibilities from older grub versions.<\/p>\n\n\n\n<p>Create the VM:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<blockquote class=\"wp-block-quote\">\n<pre class=\"wp-block-code\"><code># vm create ollamavm<\/code><\/pre>\n<\/blockquote>\n\n\n\n<p>Extend the created disk0.img file to a reasonable size. At least 50 GB are needed for a basic Debian 13 + ROCm + ollama, before downloading any model.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># truncate -s 100G \/vm\/ollamavm\/disk0.img<\/code><\/pre>\n\n\n\n<p>Edit the VM config file in <code>\/vm\/ollamavm\/ollamavm.conf<\/code> as follows. The most critical part is the GPU passthru configuration at the end.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loader=\"uefi\"\n# Adjust this to the number of CPUs you wish\ncpu=4\n# Enable VNC access from host port 5900\ngraphics=YES\n# Enable better mouse positioning in VNC\nxhci_mouse=YES\n# RAM size. 16G is a bare minimum, 32G is better\nmemory=32G\n\nnetwork0_type=\"virtio-net\"\n# Connect the ethernet port to the Bhyve network switch\nnetwork0_switch=\"vm-public\"\nnetwork0_mac=\"58:9c:fc:0d:1c:83\"\n\n# The disk size should be 50 GB minimum to install a minimal system + ollama.\n# Add required space to download models, or serve these via NFS\ndisk0_type=\"virtio-blk\"\ndisk0_name=\"disk0.img\"\n\n# Provided as an example\/for the following two lines\n# leave the values created by vm create.\nuuid=\"42ff215d-d87f-11f0-bb66-244bfe8bca12\"\nnetwork0_mac=\"58:9c:fc:00:99:a5\"\n\n#\n# GPU passthru\n#\npassthru0=\"3\/0\/0\"\npassthru1=\"3\/0\/1\"\n#\n# Use this instead if you need a particular PCI address for\n# the GPU to work\n# passthru0=\"3\/0\/0=3:0\"\n# passthru1=\"3\/0\/1=3:1\"<\/code><\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Install Linux<\/h2>\n\n\n\n<p>Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># vm iso<\/code><\/pre>\n\n\n\n<p>to check for available install image names, then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># vm install ollamavm <em>$install_image_name<\/em><\/code><\/pre>\n\n\n\n<p>(for example:  $install_image_name = debian-13.2.0-amd64-netinst.iso)<\/p>\n\n\n\n<p>Then start a VNC client to proceed with the Linux installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ vncviewer 127.0.0.1:5900<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install AMD ROCm in the Linux VM<\/h2>\n\n\n\n<p>Log-in to the Linux VM, then follow the ROCm installation instructions. This includes installing a more recent <code>amdgpu<\/code> driver than the stock Debian package:<\/p>\n\n\n\n<p><a href=\"https:\/\/rocm.docs.amd.com\/projects\/install-on-linux\/en\/latest\/install\/quick-start.html\">https:\/\/rocm.docs.amd.com\/projects\/install-on-linux\/en\/latest\/install\/quick-start.html<\/a><\/p>\n\n\n\n<p>Then reboot the Linux VM to load the new drivers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check the amdgpu driver successfully loads<\/h2>\n\n\n\n<p><code>dmesg<\/code> output on a successful Linux boot, for reference purposes.<\/p>\n\n\n\n<p>In some cases (for example, after using the GPU in another VM), the load may fail. In the case, rebooting the FreeBSD host may be needed to reset the GPU.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># dmesg -t | grep amdgpu\n&#91;drm] amdgpu kernel modesetting enabled.\namdgpu: Virtual CRAT table created for CPU\namdgpu: Topology: Add CPU node\namdgpu 0000:00:03.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x4556\namdgpu 0000:00:03.0: amdgpu: Fetched VBIOS from ROM\namdgpu: ATOM BIOS: 113-44TC6SHB1-P03\namdgpu 0000:00:03.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported\namdgpu 0000:00:03.0: BAR 2 &#91;mem 0x1010000000-0x10101fffff 64bit pref]: releasing\namdgpu 0000:00:03.0: BAR 0 &#91;mem 0x1000000000-0x100fffffff 64bit pref]: releasing\namdgpu 0000:00:03.0: BAR 0 &#91;mem 0x1000000000-0x100fffffff 64bit pref]: assigned\namdgpu 0000:00:03.0: BAR 2 &#91;mem 0x1010000000-0x10101fffff 64bit pref]: assigned\namdgpu 0000:00:03.0: amdgpu: VRAM: 16304M 0x0000008000000000 - 0x00000083FAFFFFFF (16304M used)\namdgpu 0000:00:03.0: amdgpu: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF\n&#91;drm] amdgpu: 16304M of VRAM memory ready\n&#91;drm] amdgpu: 16050M of GTT memory ready.\namdgpu 0000:00:03.0: amdgpu: PCIE GART of 512M enabled (table at 0x0000008000000000).\namdgpu 0000:00:03.0: amdgpu: RAS: optional ras ta ucode is not available\namdgpu 0000:00:03.0: amdgpu: RAP: optional rap ta ucode is not available\namdgpu 0000:00:03.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available\namdgpu 0000:00:03.0: amdgpu: smu driver if version = 0x0000002e, smu fw if version = 0x00000032, smu fw program = 0, smu fw version = 0x00663e00 (102.62.0)\namdgpu 0000:00:03.0: amdgpu: SMU driver if version not matched\namdgpu 0000:00:03.0: amdgpu: SMU is initialized successfully!\nsnd_hda_intel 0000:00:03.1: bound 0000:00:03.0 (ops amdgpu_dm_audio_component_bind_ops &#91;amdgpu])\namdgpu 0000:00:03.0: amdgpu: MES FW version must be &gt;= 0x82 to enable LR compute workaround.\nkfd kfd: amdgpu: Allocated 3969056 bytes on gart\nkfd kfd: amdgpu: Total number of KFD nodes to be created: 1\namdgpu: Virtual CRAT table created for GPU\namdgpu: Topology: Add dGPU node &#91;0x7590:0x1002]\nkfd kfd: amdgpu: added device 1002:7590\namdgpu 0000:00:03.0: amdgpu: SE 2, SH per SE 2, CU per SH 8, active_cu_number 32\namdgpu 0000:00:03.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring comp_1.0.1 uses VM inv eng 6 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring comp_1.1.1 uses VM inv eng 7 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring sdma0 uses VM inv eng 8 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring sdma1 uses VM inv eng 9 on hub 0\namdgpu 0000:00:03.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8\namdgpu 0000:00:03.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8\namdgpu 0000:00:03.0: amdgpu: Using BACO for runtime pm\n&#91;drm] Initialized amdgpu 3.61.0 for 0000:00:03.0 on minor 0\namdgpu 0000:00:03.0: &#91;drm] fb1: amdgpudrmfb frame buffer device\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Check GPU access is enabled in ROCm<\/h2>\n\n\n\n<p>Check <code>rocminfo<\/code> output. The following output shows 2 agents.<\/p>\n\n\n\n<p>Agent 1 is the processor (Ryzen 5600G, which includes a minimal GPU &#8212; this seems to work by default, interestingly, no passthru is needed, but it is much slower than the GPU card).<\/p>\n\n\n\n<p>Agent 2 is what matters: the GPU card. It may obviously show as agent 1 if your CPU doesn&#8217;t include a GPU. If the GPU card is not listed, most likely there is something wrong with the <code>amdgpu<\/code> driver and\/or the passthru. Check the system boot logs (with <code>dmesg<\/code>). Use Linux <code>lspci<\/code> (the Linux equivalent to <code>pciconf<\/code>) to check the GPU shows up in the VM.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ rocminfo\nROCk module is loaded\n=====================    \nHSA System Attributes    \n=====================    \nRuntime Version:         1.18\nRuntime Ext Version:     1.14\nSystem Timestamp Freq.:  1000.000000MHz\nSig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)\nMachine Model:           LARGE                              \nSystem Endianness:       LITTLE                             \nMwaitx:                  DISABLED\nXNACK enabled:           NO\nDMAbuf Support:          YES\nVMM Support:             YES\n\n==========               \nHSA Agents               \n==========               \n*******                  \nAgent 1                  \n*******                  \n  Name:                    AMD Ryzen 5 5600G with Radeon Graphics\n  Uuid:                    CPU-XX                             \n  Marketing Name:          AMD Ryzen 5 5600G with Radeon Graphics\n  Vendor Name:             CPU                                \n  Feature:                 None specified                     \n  Profile:                 FULL_PROFILE                       \n  Float Round Mode:        NEAR                               \n  Max Queue Number:        0(0x0)                             \n  Queue Min Size:          0(0x0)                             \n  Queue Max Size:          0(0x0)                             \n  Queue Type:              MULTI                              \n  Node:                    0                                  \n  Device Type:             CPU                                \n  Cache Info:              \n  Chip ID:                 0(0x0)                             \n  ASIC Revision:           0(0x0)                             \n  Cacheline Size:          64(0x40)                           \n  Max Clock Freq. (MHz):   0                                  \n  BDFID:                   0                                  \n  Internal Node ID:        0                                  \n  Compute Unit:            4                                  \n  SIMDs per CU:            0                                  \n  Shader Engines:          0                                  \n  Shader Arrs. per Eng.:   0                                  \n  WatchPts on Addr. Ranges:1                                  \n  Memory Properties:       \n  Features:                None\n  Pool Info:               \n    Pool 1                   \n      Segment:                 GLOBAL; FLAGS: FINE GRAINED        \n      Size:                    32870884(0x1f591e4) KB             \n      Allocatable:             TRUE                               \n      Alloc Granule:           4KB                                \n      Alloc Recommended Granule:4KB                                \n      Alloc Alignment:         4KB                                \n      Accessible by all:       TRUE                               \n    Pool 2                   \n      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED\n      Size:                    32870884(0x1f591e4) KB             \n      Allocatable:             TRUE                               \n      Alloc Granule:           4KB                                \n      Alloc Recommended Granule:4KB                                \n      Alloc Alignment:         4KB                                \n      Accessible by all:       TRUE                               \n    Pool 3                   \n      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED\n      Size:                    32870884(0x1f591e4) KB             \n      Allocatable:             TRUE                               \n      Alloc Granule:           4KB                                \n      Alloc Recommended Granule:4KB                                \n      Alloc Alignment:         4KB                                \n      Accessible by all:       TRUE                               \n    Pool 4                   \n      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      \n      Size:                    32870884(0x1f591e4) KB             \n      Allocatable:             TRUE                               \n      Alloc Granule:           4KB                                \n      Alloc Recommended Granule:4KB                                \n      Alloc Alignment:         4KB                                \n      Accessible by all:       TRUE                               \n  ISA Info:                \n*******                  \nAgent 2                  \n*******                  \n  Name:                    gfx1200                            \n  Uuid:                    GPU-22fb87b93c7f6339               \n  Marketing Name:          AMD Radeon RX 9060 XT              \n  Vendor Name:             AMD                                \n  Feature:                 KERNEL_DISPATCH                    \n  Profile:                 BASE_PROFILE                       \n  Float Round Mode:        NEAR                               \n  Max Queue Number:        128(0x80)                          \n  Queue Min Size:          64(0x40)                           \n  Queue Max Size:          131072(0x20000)                    \n  Queue Type:              MULTI                              \n  Node:                    1                                  \n  Device Type:             GPU                                \n  Cache Info:              \n    L1:                      32(0x20) KB                        \n    L2:                      4096(0x1000) KB                    \n    L3:                      32768(0x8000) KB                   \n  Chip ID:                 30096(0x7590)                      \n  ASIC Revision:           1(0x1)                             \n  Cacheline Size:          256(0x100)                         \n  Max Clock Freq. (MHz):   2840                               \n  BDFID:                   24                                 \n  Internal Node ID:        1                                  \n  Compute Unit:            32                                 \n  SIMDs per CU:            2                                  \n  Shader Engines:          2                                  \n  Shader Arrs. per Eng.:   2                                  \n  WatchPts on Addr. Ranges:4                                  \n  Coherent Host Access:    FALSE                              \n  Memory Properties:       \n  Features:                KERNEL_DISPATCH \n  Fast F16 Operation:      TRUE                               \n  Wavefront Size:          32(0x20)                           \n  Workgroup Max Size:      1024(0x400)                        \n  Workgroup Max Size per Dimension:\n    x                        1024(0x400)                        \n    y                        1024(0x400)                        \n    z                        1024(0x400)                        \n  Max Waves Per CU:        32(0x20)                           \n  Max Work-item Per CU:    1024(0x400)                        \n  Grid Max Size:           4294967295(0xffffffff)             \n  Grid Max Size per Dimension:\n    x                        2147483647(0x7fffffff)             \n    y                        65535(0xffff)                      \n    z                        65535(0xffff)                      \n  Max fbarriers\/Workgrp:   32                                 \n  Packet Processor uCode:: 962                                \n  SDMA engine uCode::      86                                 \n  IOMMU Support::          None                               \n  Pool Info:               \n    Pool 1                   \n      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      \n      Size:                    16695296(0xfec000) KB              \n      Allocatable:             TRUE                               \n      Alloc Granule:           4KB                                \n      Alloc Recommended Granule:2048KB                             \n      Alloc Alignment:         4KB                                \n      Accessible by all:       FALSE                              \n    Pool 2                   \n      Segment:                 GROUP                              \n      Size:                    64(0x40) KB                        \n      Allocatable:             FALSE                              \n      Alloc Granule:           0KB                                \n      Alloc Recommended Granule:0KB                                \n      Alloc Alignment:         0KB                                \n      Accessible by all:       FALSE                              \n  ISA Info:                \n    ISA 1                    \n      Name:                    amdgcn-amd-amdhsa--gfx1200         \n      Machine Models:          HSA_MACHINE_MODEL_LARGE            \n      Profiles:                HSA_PROFILE_BASE                   \n      Default Rounding Mode:   NEAR                               \n      Default Rounding Mode:   NEAR                               \n      Fast f16:                TRUE                               \n      Workgroup Max Size:      1024(0x400)                        \n      Workgroup Max Size per Dimension:\n        x                        1024(0x400)                        \n        y                        1024(0x400)                        \n        z                        1024(0x400)                        \n      Grid Max Size:           4294967295(0xffffffff)             \n      Grid Max Size per Dimension:\n        x                        2147483647(0x7fffffff)             \n        y                        65535(0xffff)                      \n        z                        65535(0xffff)                      \n      FBarrier Max Size:       32                                 \n    ISA 2                    \n      Name:                    amdgcn-amd-amdhsa--gfx12-generic   \n      Machine Models:          HSA_MACHINE_MODEL_LARGE            \n      Profiles:                HSA_PROFILE_BASE                   \n      Default Rounding Mode:   NEAR                               \n      Default Rounding Mode:   NEAR                               \n      Fast f16:                TRUE                               \n      Workgroup Max Size:      1024(0x400)                        \n      Workgroup Max Size per Dimension:\n        x                        1024(0x400)                        \n        y                        1024(0x400)                        \n        z                        1024(0x400)                        \n      Grid Max Size:           4294967295(0xffffffff)             \n      Grid Max Size per Dimension:\n        x                        2147483647(0x7fffffff)             \n        y                        65535(0xffff)                      \n        z                        65535(0xffff)                      \n      FBarrier Max Size:       32                                 \n*** Done ***             \n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install ollama<\/h2>\n\n\n\n<p>Then install and start ollama, see:<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.ollama.com\/linux\">https:\/\/docs.ollama.com\/linux<\/a><\/p>\n\n\n\n<p><em>Et voil\u00e0<\/em>! Enjoy!<\/p>\n\n\n\n<p>PS, the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/signal.eu.org\/blog\/wp-content\/uploads\/2025\/12\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"686\" src=\"https:\/\/signal.eu.org\/blog\/wp-content\/uploads\/2025\/12\/image.png\" alt=\"\" class=\"wp-image-2696\" srcset=\"https:\/\/signal.eu.org\/blog\/wp-content\/uploads\/2025\/12\/image.png 1024w, https:\/\/signal.eu.org\/blog\/wp-content\/uploads\/2025\/12\/image-300x201.png 300w, https:\/\/signal.eu.org\/blog\/wp-content\/uploads\/2025\/12\/image-768x515.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">devstral-small-2 (24B) over open-webui over ollama over Debian 13 over bhyve over FreeBSD 15.0 over AMD RX9060.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of the following post is to share my experience regarding running a recent AMD GPU (RX9060) to accelerate LLM inference in ollama. It should also work with older or similar AMD GPUs such as the RX9070. Depending on your GPU, you may need FreeBSD 15.0, but this has a good chance to also &hellip; <a href=\"https:\/\/signal.eu.org\/blog\/2025\/12\/17\/running-ollama-on-a-amd-gpu-with-bhyve-freebsd\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Running ollama on a AMD GPU with bhyve\/FreeBSD<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[36,25,35],"_links":{"self":[{"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/posts\/2620"}],"collection":[{"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/comments?post=2620"}],"version-history":[{"count":77,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/posts\/2620\/revisions"}],"predecessor-version":[{"id":2699,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/posts\/2620\/revisions\/2699"}],"wp:attachment":[{"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/media?parent=2620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/categories?post=2620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/signal.eu.org\/blog\/wp-json\/wp\/v2\/tags?post=2620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}