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: 323332367 Change-Id: Id504c6db307d4729f470bf18e508833537848fb9
This commit is contained in:
parent
8c6f2d5576
commit
7c0ed7acaa
@ -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…
x
Reference in New Issue
Block a user