emd编译遇到问题

/home/vub/Xinyue/render/extensions/earth_movers_distance/emd_kernel.cu:14:10: fatal error: THC/THC.h: 没有那个文件或目录

解决方案:
https://github.com/CoinCheung/pytorch-loss/pull/37/files

(1)注释掉 #include <THC/THC.h>
(2)把所有THCudaCheck(cudaGetLastError()); 注释掉,并修改成AT_CUDA_CHECK(cudaGetLastError());

 

/home/vub/Xinyue/render/extensions/earth_movers_distance/emd_kernel.cu(178): error: identifier "CHECK_EQ" is undefined

/home/vub/Xinyue/render/extensions/earth_movers_distance/emd_kernel.cu(266): error: identifier "CHECK_EQ" is undefined

/home/vub/Xinyue/render/extensions/earth_movers_distance/emd_kernel.cu(384): error: identifier "CHECK_EQ" is undefined
解决方案:
:error:identifier “CHECK_EQ“ is undefined报错解决_bid' - undeclared identifier 11.mq5 33 34-CSDN博客

//   CHECK_EQ(xyz2.size(0), b); 注释掉这三行,把其他的相同内容也做替换
//   CHECK_EQ(xyz1.size(2), 3);
//   CHECK_EQ(xyz2.size(2), 3);
  TORCH_CHECK_EQ(xyz2.size(0), b); 更换成这三行
  TORCH_CHECK_EQ(xyz1.size(2), 3);
  TORCH_CHECK_EQ(xyz2.size(2), 3);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值