zoukankan      html  css  js  c++  java
  • matconv-GPU 编译问题

    如出现以下错误:

    1 error detected in the compilation of "C:/Users/Justin/AppData/Local/Temp/tmpxft_00001afc_00000000-8_pooling_gpu.cpp1.ii".
    pooling_gpu.cu
    Error using vl_compilenn>nvcc_compile (line 521)
    Command "C:Program FilesNVIDIA GPU Computing ToolkitCUDAv8.0in vcc" -c
    "C:UsersJustinDocumentsMATLABmatconvnet-1.0-beta20matlabsrcitsimplpooling_gpu.cu" -DNDEBUG -DENABLE_GPU -DENABLE_DOUBLE -D__SSSE3__
    -gencode=arch=compute_61,code="sm_61,compute_61" -I"C:Program FilesMATLABR2016aexterninclude" -I"C:Program
    FilesMATLABR2016a oolboxdistcompgpuexterninclude" -gencode=arch=compute_61,code="sm_61,compute_61" -Xcompiler /MD -o
    "C:UsersJustinDocumentsMATLABmatconvnet-1.0-beta20matlabmex.builditsimplpooling_gpu.obj" failed.

    Error in vl_compilenn (line 466)
    nvcc_compile(opts, srcs{i}, objfile, flags.nvcc) ;

    则要修改上面错误中红色字体的.cu文件

    在163行的函数用下面替换

    // an implementation of atomicAdd() for double (really slow)
    #if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600
    #else
    __device__ double atomicAdd(double* address, double val)
    {
    unsigned long long int* address_as_ull = (unsigned long long int*)address;
    unsigned long long int old = *address_as_ull, assumed;
    do {
    assumed = old;
    old = atomicCAS(address_as_ull, assumed,
    __double_as_longlong(val +
    __longlong_as_double(assumed)));
    } while (assumed != old);
    return __longlong_as_double(old);
    }
    #endif

  • 相关阅读:
    vue 插件的使用 todolist案例
    vue 传值 混入mixin
    vue 生命周期函数
    vue 指令总结
    vue 其它的指令
    vue 监听数据变化的原理 表单数据的收集
    vue for循环中的key
    vue 学习
    vue 学习
    HDU 1029
  • 原文地址:https://www.cnblogs.com/burton/p/9996744.html
Copyright © 2011-2022 走看看