# Is OpenCL possible with the current Nvidia driver?



## inf3rno (Jan 5, 2021)

Currently I have an Nvidia GTX 750 Ti video card I want to use for my little machine learning projects, and I see that CUDA does not work on FreeBSD. I am curious if I could use OpenCL https://www.freshports.org/devel/opencl with this Nvidia card, or that is out of the question too?


----------



## msplsh (Jan 5, 2021)

devel/ocl-icd says it will work with a non-free ICD, and I've seen people get nvidia.icd from... wherever (presumably some nvidia binary driver package)... on linux, so perhaps the mechanism is the same.  I couldn't find any specific examples of this working, though.


----------



## shkhln (Jan 5, 2021)

Nvidia's OpenCL is implemented through CUDA.


----------



## inf3rno (Jan 5, 2021)

shkhln said:


> Nvidia's OpenCL is implemented through CUDA.


I guess that means not. Then I'll use virtualization or sell this Nvidia card and buy an AMD one. Using WebGL appears to be an alternative too, but I guess it is very slow.


----------



## shkhln (Jan 6, 2021)

WebGL has nothing to do with general-purpose GPU computing. Vulkan could be used for that purpose in theory, but you'll have to implement everything from scratch yourself, which is probably not what you are looking for.

I'm kind of curious what kind of small project you have in mind. You obviously didn't bother to do any research on the topic, so there no reason for me to believe you actually need GPU anything.


----------



## inf3rno (Jan 6, 2021)

shkhln said:


> WebGL has nothing to do with general-purpose GPU computing. Vulkan could be used for that purpose in theory, but you'll have to implement everything from scratch yourself, which is probably not what you are looking for.
> 
> I'm kind of curious what kind of small project you have in mind. You obviously didn't bother to do any research on the topic, so there no reason for me to believe you actually need GPU anything.


Well Tensorflow can run on CPU too, I just have a spare GPU I haven't sold, so I thought I use that instead of stressing the CPU. It is a sequential pattern mining project, I want to compare normal algorithms like SPADE or PrefixSpan to machine learning.

Looks like you are not up to date either:

https://github.com/tensorflow/tfjs


> A WebGL accelerated JavaScript library for training and deploying ML models.


----------



## a6h (Jan 6, 2021)

OpenCL is not GPU-only. it can run on single-core CPU, multicore CPU, FPGA, single-core, and multicore MCU (*).

(*) OpenCL on microcontrollers | multicore-conference.com


----------

