Openpose win10编译(Visual Studio2019)

Openpose win10编译(Visual Studio2019)

前言

Openpose 地址:Openpose主页
使用git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose下载openpose
参考博客:https://blog.csdn.net/zb1165048017/article/details/82115724,https://blog.csdn.net/m0_37638031/article/details/78896818

【注】如果使用git时下载速度过慢,可以将openpose代码fork到国内的码云中后再clone代码
git clone https://gitee.com/aydon/openpose.git

准备工作

需求工具

CMakeVisual Studio 2019,CUDA,cudnn
在编写此文章时使用的版本为:
CMake:3.15.0
CUDA:10.1 CUDA10.1下载
CUDA下载
CUDA下载
cudnn:cudnn-10.1-windows10-x64-v7.6.1.34,戳这里
在这里插入图片描述

安装CUDA及cudnn

CUDA下载完成后,点击执行.exe文件,接下来一直选择下一步即可。
安装完成后打开cmd,输入nvcc -V,显示如下则安装成功。最后一行显示版本号,图中是10.1.
在这里插入图片描述
打开Visual sutdio新建工程,选择CUDA模块
在这里插入图片描述
复制以下代码,替换kernel.cu下的内容

// CUDA runtime 库 + CUBLAS 库 
#include "cuda_runtime.h" 
#include "cublas_v2.h" 
#include <time.h> 
#include <iostream> 
 
using namespace std;
// 定义测试矩阵的维度 
int const M = 5;
int const N = 10;
int main()
{
   
	// 定义状态变量 
	cublasStatus_t status;
	// 在内存中为将要计算的矩阵开辟空间 
	float *h_A = (float*)malloc(N*M * sizeof(float));
	float *h_B = (float*)malloc(N*M * sizeof(float));
	// 在 内存 中为将要存放运算结果的矩阵开辟空间 
	float *h_C = (float*)malloc(M*M 
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值