# Successful in porting and fully functional "pjreddie/darknet" YOLO 3 on FreeBSD 13.1 uses AMD GPU.



## First_Law_of_Unix (Oct 12, 2022)

Hello,

If this brings interests to you, then its means you are looking to get YOLO machine vision, AI/ML working on FreeBSD which utilizes GPU.

We all know that Nvidia CUDA is not supported on FreeBSD and AMD's ROCm has not been ported yet.

So after doing months (2.5 months) of intense research on google, I stumbled upon a github which is a fork of pjreddie/darknet:








						GitHub - sowson/darknet: Darknet on OpenCL Convolutional Neural Networks on OpenCL on Intel & NVidia & AMD & Mali GPUs for macOS & GNU/Linux & Windows & FreeBSD
					

Darknet on OpenCL Convolutional Neural Networks on OpenCL on Intel & NVidia & AMD & Mali GPUs for macOS & GNU/Linux & Windows & FreeBSD - GitHub - sowson/darknet: Darknet on...




					github.com
				




The great thing about this darknet github fork is that it makes use of all types of GPUs and not solely locked to Nvidia GPUs.
It is able to do so thanks to the gentlemen named Piotr Sowa who with great joy ported the CUDA code into pure and proper OpenCL from scratch.

Here is his blog describing how everything works:








						DarkNet Training
					

Hi, Today I would like to announce that my GitHub fork at  has a new update. The fork is an advanced port of DarkNet CNN from CUDA to OpenCL and tested on macOS with eGPU from Sonnet named Breakawa…




					iblog.isowa.io
				




So I spent the last 5 days on porting it to FreeBSD 13.1 with the great help from Sowa:


			https://github.com/sowson/darknet/issues/79
		


Everything is documented and I also included a patch for FreeBSD.

It's super fast too, I get "0.345936 seconds." For predictions with large sums of people in one image.

So finally, we can use AMD GPUs (literally any GPU which has OpenCL support) on FreeBSD to do accelerated YOLO 3 machine vision AI/ML tasks:
Best of all would not need to use ROCm reliance.


----------

