Coder Social home page Coder Social logo

Comments (4)

Calinou avatar Calinou commented on July 22, 2024 2

Edit: Solved, see the end of this comment.


On Fedora 31, I got further by installing ncnn to /usr/local like this:

# In the root `ncnn` folder (https://github.com/Tencent/ncnn):
# Add -DNCNN_VULKAN=1 at the end of the line below to make it work :)
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build
sudo cmake --build build --target install

# In `waifu2x-ncnn-vulkan`:
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build

However, I get this error while building waifu2x-ncnn-vulkan:

❯ cmake --build build
[1/3] Building CXX object CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o
FAILED: CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o 
/usr/lib64/ccache/c++   -I. -isystem /usr/local/include/ncnn -fopenmp -O2 -DNDEBUG -fPIE   -fopenmp -MD -MT CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o -MF CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o.d -o CMakeFiles/waifu2x-ncnn-vulkan.dir/main.cpp.o -c ../main.cpp
In file included from ../main.cpp:63:
../waifu2x.h:35:11: error: ‘Pipeline’ in namespace ‘ncnn’ does not name a type
   35 |     ncnn::Pipeline* waifu2x_preproc;
      |           ^~~~~~~~
../waifu2x.h:36:11: error: ‘Pipeline’ in namespace ‘ncnn’ does not name a type
   36 |     ncnn::Pipeline* waifu2x_postproc;
      |           ^~~~~~~~
../main.cpp: In function ‘int main(int, char**)’:
../main.cpp:524:11: error: ‘create_gpu_instance’ is not a member of ‘ncnn’
  524 |     ncnn::create_gpu_instance();
      |           ^~~~~~~~~~~~~~~~~~~
../main.cpp:530:27: error: ‘get_gpu_count’ is not a member of ‘ncnn’; did you mean ‘get_cpu_count’?
  530 |     int gpu_count = ncnn::get_gpu_count();
      |                           ^~~~~~~~~~~~~
      |                           get_cpu_count
../main.cpp:535:15: error: ‘destroy_gpu_instance’ is not a member of ‘ncnn’
  535 |         ncnn::destroy_gpu_instance();
      |               ^~~~~~~~~~~~~~~~~~~~
../main.cpp:539:33: error: ‘get_gpu_info’ is not a member of ‘ncnn’
  539 |     int gpu_queue_count = ncnn::get_gpu_info(gpuid).compute_queue_count;
      |                                 ^~~~~~~~~~~~
../main.cpp:613:11: error: ‘destroy_gpu_instance’ is not a member of ‘ncnn’
  613 |     ncnn::destroy_gpu_instance();
      |           ^~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Edit: I solved it by passing -DNCNN_VULKAN=1 on the ncnn CMake line, then building and installing it again. It's not enabled by default, even if you already have Vulkan development libraries installed.

from waifu2x-ncnn-vulkan.

akai-katto avatar akai-katto commented on July 22, 2024

I'm dumb as shit protobuff isn't installed

from waifu2x-ncnn-vulkan.

akai-katto avatar akai-katto commented on July 22, 2024

Nevermind, I ran the ncnn aur-package again and it also gave the protobuf error. I'm sort of confused as to what's causing the issue here.

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

I add a small build guide in README
https://github.com/nihui/waifu2x-ncnn-vulkan#build-from-source

from waifu2x-ncnn-vulkan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.