Coder Social home page Coder Social logo

Comments (1)

ZWJ-here avatar ZWJ-here commented on June 17, 2024

计算力不匹配的问题
未设置前opencv在cmake的输出是这样的:计算力是30 35 37
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: YES
USE NVCUVID:NO
NVIDIA GPU arch: 30 35 37
NVIDIA PTX archs:
Use fast math:NO
#Note:6.1为GTX1080的计算能力,不同显卡需要根据自己的计算能力进行修改
#查询显卡计算能力,可以通过运行cuda samples中的deviceQuery得知。
#(文件夹NVIDIA_CUDA-*_Samples下编译示例, *为版本号)
如果设置成功,cmake界面会有如下显示(我的显卡是1080ti):
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: YES
USE NVCUVID:NO
NVIDIA GPU arch: 61
NVIDIA PTX archs:61
Use fast math:NO

GPU arch/PTX archs都被设置为6.1
但如果运气不佳,添加编译选项并不能解决问题。
这时候需要修改opencv中关于CUDA计算能力这部分的配置文件./cmake/OpenCVDetectCUDA.cmake

set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
set(CUDA_ARCH_PTX ${__cuda_arch_ptx} CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
之前添加
set(__cuda_arch_bin "6.1")
set(__cuda_arch_ptx "6.1")
保存后cmake上面那一段,重新将opencv cmake make make install一遍出现正确的计算能力显示61

最后重新编译dense_flow

from dense_flow.

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.