diff --git a/src/io/opencl_interface.cpp b/src/io/opencl_interface.cpp index 1a4b1f67cbc556389da7c78d8852b65731eb963a..1df5b48339b9b8d82c3e0cc4452c1f7876458ece 100644 --- a/src/io/opencl_interface.cpp +++ b/src/io/opencl_interface.cpp @@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +#ifdef PADDLE_MOBILE_CL #include "io/opencl_interface.h" #include "framework/cl/cl_engine.h" @@ -31,3 +32,4 @@ bool isInitSuccess() { } } // namespace paddle_mobile +#endif diff --git a/src/io/opencl_interface.h b/src/io/opencl_interface.h index 3812abf00f654768c9b687f026478280cc227c32..d7877e8afd0e1cf40b732cfa15719735d9714a8c 100644 --- a/src/io/opencl_interface.h +++ b/src/io/opencl_interface.h @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #pragma once - +#ifdef PADDLE_MOBILE_CL #include "CL/cl.h" namespace paddle_mobile { @@ -22,4 +22,6 @@ cl_context getContext(); cl_command_queue getClCommandQueue(); bool isInitSuccess(); +#endif + } // namespace paddle_mobile