DeadSix27 / waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV
MIT License
792 stars 86 forks source link

Cuda build fix #233

Closed YukihoAA closed 4 years ago

YukihoAA commented 4 years ago

merge after #232

fix crash problem with CUDA device with non-cuda build binary

fixes #219

kattjevfel commented 4 years ago

This fixes #219 but wouldn't it be better to check at runtime if cuda is present? It seemed to work just fine if you had compiled it without cuda, but had cuda at runtime..

Anyway I suppose it does fix it, just thinking out loud :)

YukihoAA commented 4 years ago

@Kattus

build without cuda has no binary compiled to run cuda.

so if you didn't build with cuda, whether you have cuda runtime or not, waifu2x-converter-cpp cannot run cuda instance. because there no information to run cuda.

as c++ is not script language there is no way to compile in instance so ya. it cannot be.

kattjevfel commented 4 years ago

@YukihoAA Right, it appears I was wrong.. I did some more testing and you're absolutely right. Sorry for misunderstanding! :)

Anyway it seems CUDA only needs to be installed at compile time then, cool!