Only instantiate abs kernel templates if needed.
When MLIR generated GPU kernels are used, there is no need to instantiate the GPU kernels based on Eigen. This would just lead to unused code being linked in. PiperOrigin-RevId: 323998013 Change-Id: Ia1a3057f39e5372ae2da15631f0c65a83a2ca0c8
This commit is contained in:
parent
a4c706fe09
commit
2cf1277b11
@ -19,7 +19,11 @@ limitations under the License.
|
||||
|
||||
namespace tensorflow {
|
||||
namespace functor {
|
||||
#ifdef MLIR_GENERATED_GPU_KERNELS_ENABLED
|
||||
DEFINE_UNARY2(abs, complex64, complex128);
|
||||
#else
|
||||
DEFINE_UNARY6(abs, Eigen::half, float, double, int64, complex64, complex128);
|
||||
#endif
|
||||
} // namespace functor
|
||||
} // namespace tensorflow
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user