【问题标题】:Building Tensorflow with OpenCL support fails on Ubuntu 18.04在 Ubuntu 18.04 上构建具有 OpenCL 支持的 TensorFlow 失败
【发布时间】:2018-10-21 22:40:18
【问题描述】:

在尝试使用 configuration 在 Ubuntu 18.04 上编译 Tensorflow 时,我遇到了这个错误:

ERROR: /home/joao/Documents/playground/tensorflow/tensorflow/contrib/tensor_forest/hybrid/BUILD:72:1: C++ compilation of rule '//tensorflow/contrib/tensor_forest/hybrid:utils' failed (Exit 1)
In file included from tensorflow/contrib/tensor_forest/hybrid/core/ops/utils.cc:15:
In file included from ./tensorflow/contrib/tensor_forest/hybrid/core/ops/utils.h:20:
In file included from ./tensorflow/core/framework/tensor.h:19:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:99:
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:163:19: error: no matching member function for call to 'get_access'
    auto ptr =buf.get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::host_buffer>().get_pointer();
              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:532:3: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'accessMode'
  get_access() {
  ^
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:550:53: note: candidate function template not viable: requires single argument 'cgh', but no arguments were provided
  accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                    ^
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:572:53: note: candidate function template not viable: requires 3 arguments, but 0 were provided
  accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                    ^
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:592:53: note: candidate function template not viable: requires at least 2 arguments, but 0 were provided
  accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                    ^
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:609:68: note: candidate function template not viable: requires 2 arguments, but 0 were provided
  accessor<T, dimensions, accessMode, access::target::host_buffer> get_access(
                                                                   ^
external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:623:68: note: candidate function template not viable: requires at least argument 'range', but no arguments were provided
  accessor<T, dimensions, accessMode, access::target::host_buffer> get_access(
                                                                   ^
In file included from tensorflow/contrib/tensor_forest/hybrid/core/ops/utils.cc:15:
In file included from ./tensorflow/contrib/tensor_forest/hybrid/core/ops/utils.h:20:
In file included from ./tensorflow/core/framework/tensor.h:19:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:99:
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:61: error: no member named 'map_allocator' in namespace 'cl::sycl'
      auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                  ~~~~~~~~~~^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:75: error: unexpected type name 'uint8_t': expected expression
      auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                                          ^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:86: warning: expression result unused [-Wunused-value]
      auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:31: error: expected unqualified-id
        auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                              ^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:107: error: nested name specifier 'cl::sycl::access::target::' for declaration does not refer into a class, class template or class template partial specialization
        auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:120: error: expected ';' at end of declaration
        auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                                                                                                                       ^
                                                                                                                       ;
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:62: error: no member named 'map_allocator' in namespace 'cl::sycl'
      auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                   ~~~~~~~~~~^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:76: error: unexpected type name 'uint8_t': expected expression
      auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                                           ^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:87: warning: expression result unused [-Wunused-value]
      auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:32: error: expected unqualified-id
        auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                               ^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:117: error: nested name specifier 'cl::sycl::access::target::' for declaration does not refer into a class, class template or class template partial specialization
        auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:130: error: expected ';' at end of declaration
        auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                                                                                                                                 ^
                                                                                                                                 ;
2 warnings and 11 errors generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 170.920s, Critical Path: 39.24s
INFO: 2976 processes: 2976 local.
FAILED: Build did NOT complete successfully

如果有人能帮助我,我将不胜感激,我已经尝试解决这个问题一段时间了,但似乎没有任何效果。我也试过用 triSYCL 编译它,但问题仍然存在,我还确认在没有 OpenCL 支持的情况下编译可以按预期工作,没有任何错误。

【问题讨论】:

    标签: ubuntu tensorflow build opencl


    【解决方案1】:

    最近 SYCL 规范中有接口更改,因此您需要确保您的 TensorFlow 源代码与 ComputeCpp 版本匹配。

    遵循指南here 并确保您已下载最新版本的 ComputeCpp 并拥有来自 GitHub 的最新版本的源代码。请注意,您需要使用 Codeplay 分支 here,因为更改需要一些时间才能传播到主 TensorFlow 存储库,这在指南中进行了概述。

    【讨论】:

      【解决方案2】:

      接受的答案并没有真正的帮助,因为我从一开始就在全新安装的 Ubuntu 上遵循了链接指南,并且我也遇到了 OP 错误。

      我从 eieigen_sycl 分支上 tensorflow 的 codeplay git repo 上的最后一个版本的 Bazel 和 ComputeCpp 开始,但是在没有降级 Bazel 和引入以下内容的情况下引发了不同的错误:

      --incompatible_load_argument_is_label=false
      --incompatible_disallow_uncalled_set_constructor=false
      

      编辑

      我尝试将 ComputeCpp 从 1.0.1 逐步降级到 0.6.1 > 没有改进(更多/更少的警告,相同的错误)。

      我也尝试过使用这个替代的 git repo (https://github.com/lukeiwanski/tensorflow/tree/dev/amd_gpu),但没有运气(如此处所述:https://www.reddit.com/r/tensorflow/comments/8hwntf/tensorflow_on_ubuntu_1804_with_amd_gpu_tips/),同样的问题。

      现在使用 Bazel 0.11.0 和以下命令:

      bazel build -c opt --config=sycl --incompatible_load_argument_is_label=false --incompatible_disallow_uncalled_set_constructor=false //tensorflow/tools/pip_package:build_pip_package
      

      这是我的构建输出:

      INFO: Found 1 target...
      ERROR: /home/mlnode/tf2/tensorflow/tensorflow/core/BUILD:2024:1: C++ compilation of rule '//tensorflow/core:lib_internal_impl' failed (Exit 1)
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:99:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:163:19: error: no matching member function for call to 'get_access'
          auto ptr =buf.get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::host_buffer>().get_pointer();
                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:624:3: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'accessMode'
        get_access() {
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:642:53: note: candidate function template not viable: requires single argument 'cgh', but no arguments were provided
        accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                          ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:664:53: note: candidate function template not viable: requires 3 arguments, but 0 were provided
        accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                          ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:684:53: note: candidate function template not viable: requires at least 2 arguments, but 0 were provided
        accessor<T, dimensions, accessMode, accessTarget> get_access(
                                                          ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:701:68: note: candidate function template not viable: requires 2 arguments, but 0 were provided
        accessor<T, dimensions, accessMode, access::target::host_buffer> get_access(
                                                                         ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/buffer.h:715:68: note: candidate function template not viable: requires at least argument 'range', but no arguments were provided
        accessor<T, dimensions, accessMode, access::target::host_buffer> get_access(
                                                                         ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:99:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:61: error: no member named 'map_allocator' in namespace 'cl::sycl'
            auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                        ~~~~~~~~~~^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:75: error: unexpected type name 'uint8_t': expected expression
            auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                                                ^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:195:86: warning: expression result unused [-Wunused-value]
            auto src_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(static_cast<void*>(const_cast<Index*>(src))), cl::sycl::range<1>(n));
                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:31: error: expected unqualified-id
              auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                                    ^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:107: error: nested name specifier 'cl::sycl::access::target::' for declaration does not refer into a class, class template or class template partial specialization
              auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:198:120: error: expected ';' at end of declaration
              auto src_acc =src_buf.template get_access<cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer>(cgh);
                                                                                                                             ^
                                                                                                                             ;
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:62: error: no member named 'map_allocator' in namespace 'cl::sycl'
            auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                         ~~~~~~~~~~^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:76: error: unexpected type name 'uint8_t': expected expression
            auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                                                 ^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:217:87: warning: expression result unused [-Wunused-value]
            auto dest_buf = cl::sycl::buffer<uint8_t, 1, cl::sycl::map_allocator<uint8_t> >(static_cast<uint8_t*>(dst), cl::sycl::range<1>(n));
                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:32: error: expected unqualified-id
              auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                                     ^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:117: error: nested name specifier 'cl::sycl::access::target::' for declaration does not refer into a class, class template or class template partial specialization
              auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:220:130: error: expected ';' at end of declaration
              auto dst_acc =dest_buf.template get_access<cl::sycl::access::mode::discard_write, cl::sycl::access::target::global_buffer>(cgh);
                                                                                                                                       ^
                                                                                                                                       ;
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:54:47: warning: 'get_local' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_local with nd_item::get_local_id. [-Wdeprecated-declarations]
          const size_t plane_kernel_offset = itemID.get_local(1) * num_x_input;
                                                    ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:308:3: note: 'get_local' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:56:95: warning: 'get_global' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_global with nd_item::get_global_id. [-Wdeprecated-declarations]
          const size_t plane_tensor_offset =indexMapper.mapCudaInputPlaneToTensorInputOffset(itemID.get_global(1));
                                                                                                    ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:272:3: note: 'get_global' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:58:28: warning: 'get_local' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_local with nd_item::get_local_id. [-Wdeprecated-declarations]
          for (size_t i = itemID.get_local(0); i < num_x_input ; i += itemID.get_local_range()[0]) {
                                 ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:308:3: note: 'get_local' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:61:72: warning: 'get_global' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_global with nd_item::get_global_id. [-Wdeprecated-declarations]
            if(((i + first_input_start) < (range_x +kernelSize-1)) && itemID.get_global(1)< range_y){
                                                                             ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:272:3: note: 'get_global' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:71:15: warning: 'get_global' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_global with nd_item::get_global_id. [-Wdeprecated-declarations]
          if(itemID.get_global(0)< range_x && itemID.get_global(1)< range_y){
                    ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:272:3: note: 'get_global' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:71:48: warning: 'get_global' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_global with nd_item::get_global_id. [-Wdeprecated-declarations]
          if(itemID.get_global(0)< range_x && itemID.get_global(1)< range_y){
                                                     ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:272:3: note: 'get_global' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:73:56: warning: 'get_local' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_local with nd_item::get_local_id. [-Wdeprecated-declarations]
            const size_t index = plane_kernel_offset+ itemID.get_local(0);
                                                             ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:308:3: note: 'get_local' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:110:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h:77:93: warning: 'get_global' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_global with nd_item::get_global_id. [-Wdeprecated-declarations]
            const size_t tensor_index = indexMapper.mapCudaOutputPlaneToTensorOutputOffset(itemID.get_global(1))
                                                                                                  ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:272:3: note: 'get_global' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      

      [截断重复输出]

      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      In file included from tensorflow/core/lib/random/random_distributions.cc:16:
      In file included from ./tensorflow/core/lib/random/distribution_sampler.h:38:
      In file included from ./tensorflow/core/lib/random/simple_philox.h:24:
      In file included from ./tensorflow/core/lib/random/random_distributions.h:28:
      In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:146:
      In file included from external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSycl.h:117:
      external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h:230:43: warning: 'get_local' is deprecated: SYCL 1.2.1 revision 3 replaces nd_item::get_local with nd_item::get_local_id. [-Wdeprecated-declarations]
            const Index nLocalThreadId = itemID.get_local(1); // Local ID col
                                                ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/item.h:308:3: note: 'get_local' has been explicitly marked deprecated here
        COMPUTECPP_DEPRECATED_API(
        ^
      external/local_config_sycl/crosstool/../sycl/include/SYCL/predefines.h:475:45: note: expanded from macro 'COMPUTECPP_DEPRECATED_API'
      #define COMPUTECPP_DEPRECATED_API(reason) [[deprecated(reason)]]
                                                  ^
      40 warnings and 11 errors generated.
      Target //tensorflow/tools/pip_package:build_pip_package failed to build
      Use --verbose_failures to see the command lines of failed build steps.
      INFO: Elapsed time: 4.762s, Critical Path: 4.35s
      FAILED: Build did NOT complete successfully
      

      由于最低版本检查损坏,我还必须修复 Bazel 工作区文件,但禁用控件后似乎没有其他缺点。

      【讨论】:

        猜你喜欢
        • 2019-02-11
        • 2019-10-06
        • 2019-08-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多