benoitsteiner / tensorflow-opencl

OpenCL support for TensorFlow
Apache License 2.0
472 stars 86 forks source link

Avoid functions that might not be defined on SYCL device #51

Closed ville-k closed 7 years ago

ville-k commented 7 years ago

This fixes build warnings (*see example below) introduced in my previous random ops merge request. The referencing of undefined math functions is suspected to cause test failures on AMD GPUs.

For a full list see here

17:20:11 INFO: From Compiling tensorflow/core/kernels/random_op.cc:
17:20:11 warning: [Computecpp:CC0034]: Function sqrt is undefined but referenced on the device and the associated kernels may fail to build or execute at run time [-Wsycl-undef-func]
17:20:11 warning: [Computecpp:CC0034]: Function log is undefined but referenced on the device and the associated kernels may fail to build or execute at run time [-Wsycl-undef-func]
...