zoukankan      html  css  js  c++  java
  • caffe boost cuda __float128 undefined

    转载:https://blog.csdn.net/thesby/article/details/50512886

    编译caffe-master时遇到的问题,__float128未定义,使用到cuda版本为7.5.18,boost为1.60,gcc为4.8,opencv为3.1,操作系统为ubuntu14.04,报错如下:

    /usr/local/include/boost/config/suffix.hpp(510): error: identifier "__float128" is undefined
    
    1 error detected in the compilation of "/tmp/tmpxft_00003571_00000000-16_threshold_layer.compute_50.cpp1.ii".
    make: *** [.build_release/cuda/src/caffe/layers/threshold_layer.o] Error 1
    make: *** Waiting for unfinished jobs....
    /usr/local/include/boost/config/suffix.hpp(510): error: identifier "__float128" is undefined
    
    1 error detected in the compilation of "/tmp/tmpxft_00003578_00000000-16_batch_reindex_layer.compute_50.cpp1.ii".
    make: *** [.build_release/cuda/src/caffe/layers/batch_reindex_layer.o] Error 1
    /usr/local/include/boost/config/suffix.hpp(510): error: identifier "__float128" is undefined
    
    1 error detected in the compilation of "/tmp/tmpxft_0000357f_00000000-16_reduction_layer.compute_50.cpp1.ii".
    make: *** [.build_release/cuda/src/caffe/layers/reduction_layer.o] Error 1
    /usr/local/include/boost/config/suffix.hpp(510): error: identifier "__float128" is undefined
    
    1 error detected in the compilation of "/tmp/tmpxft_00003588_00000000-16_softmax_layer.compute_50.cpp1.ii".
    make: *** [.build_release/cuda/src/caffe/layers/softmax_layer.o] Error 1


    问题在于boost到gcc.h头文件定义存在bug。解决方法就是:

    sudo gedit /usr/local/include/boost/config/compiler/gcc.hpp
    1
    把第156行到内容由

    #if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
    1
    修改为:

    #if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(__CUDACC__)
    ---------------------

  • 相关阅读:
    最不要勉强的,是感情.
    Nginx+phpfastcgi下flush 一下子全部输出问题
    php excel 读取日期问题
    JavaScript年月日和时间戳互转
    mysql 查找除id外其他重复的字段数据
    Thinkphp 下 MySQL group by 接count 获得条数方法
    MySQL性能管理及架构设计 --- 理论篇
    MySQL 导入.sql文件
    Apache ab 压力并发测试工具
    工作生活随笔
  • 原文地址:https://www.cnblogs.com/haiyang21/p/9928853.html
Copyright © 2011-2022 走看看