提交 546926a1 编写于 作者: L Liangliang He

Fix CL_HPP_TARGET_OPENCL_VERSION warning

上级 29b97706
...@@ -12,11 +12,11 @@ load("//mace:mace.bzl", "if_android") ...@@ -12,11 +12,11 @@ load("//mace:mace.bzl", "if_android")
cc_library( cc_library(
name = "opencl_runtime", name = "opencl_runtime",
srcs = glob([ srcs = glob([
"runtime/opencl/cl.hpp",
"runtime/opencl/cl2.hpp",
"runtime/opencl/*.cc", "runtime/opencl/*.cc",
]), ]),
hdrs = glob([ hdrs = glob([
"runtime/opencl/cl.hpp",
"runtime/opencl/cl2.hpp",
"runtime/opencl/*.h", "runtime/opencl/*.h",
]), ]),
copts = ["-std=c++11"], copts = ["-std=c++11"],
......
//
// Copyright (c) 2017 XiaoMi All rights reserved.
//
#ifndef MACE_CORE_RUNTIME_OPENCL_CL2_HEADER_H_
#define MACE_CORE_RUNTIME_OPENCL_CL2_HEADER_H_
#define CL_HPP_TARGET_OPENCL_VERSION 200
#include "mace/core/runtime/opencl/cl2.hpp"
#endif // MACE_CORE_RUNTIME_OPENCL_CL2_HEADER_H_
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Copyright (c) 2017 XiaoMi All rights reserved. // Copyright (c) 2017 XiaoMi All rights reserved.
// //
#include "mace/core/runtime/opencl/cl2_header.h"
#include "mace/core/runtime/opencl/opencl_allocator.h" #include "mace/core/runtime/opencl/opencl_allocator.h"
#include "mace/core/runtime/opencl/cl2.hpp"
#include "mace/core/runtime/opencl/opencl_runtime.h" #include "mace/core/runtime/opencl/opencl_runtime.h"
namespace mace { namespace mace {
......
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
#ifndef MACE_CORE_RUNTIME_OPENCL_OPENCL_RUNTIME_H_ #ifndef MACE_CORE_RUNTIME_OPENCL_OPENCL_RUNTIME_H_
#define MACE_CORE_RUNTIME_OPENCL_OPENCL_RUNTIME_H_ #define MACE_CORE_RUNTIME_OPENCL_OPENCL_RUNTIME_H_
#ifndef CL_HPP_TARGET_OPENCL_VERSION
#define CL_HPP_TARGET_OPENCL_VERSION 200
#endif
#include <map> #include <map>
#include <mutex> #include <mutex>
#include "mace/core/runtime/opencl/cl2.hpp" #include "mace/core/runtime/opencl/cl2_header.h"
#include "mace/core/runtime/opencl/opencl_wrapper.h" #include "mace/core/runtime/opencl/opencl_wrapper.h"
namespace mace { namespace mace {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// //
#include "mace/kernels/batch_norm.h" #include "mace/kernels/batch_norm.h"
#include "mace/core/runtime/opencl/cl2.hpp" #include "mace/core/runtime/opencl/cl2_header.h"
#include "mace/core/runtime/opencl/opencl_runtime.h" #include "mace/core/runtime/opencl/opencl_runtime.h"
#include "mace/utils/tuner.h" #include "mace/utils/tuner.h"
...@@ -79,4 +79,4 @@ void BatchNormFunctor<DeviceType::OPENCL, float>::operator()( ...@@ -79,4 +79,4 @@ void BatchNormFunctor<DeviceType::OPENCL, float>::operator()(
} }
} // namespace kernels } // namespace kernels
} // namespace mace } // namespace mace
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册