diff options
author | 2016-09-29 09:12:50 -0800 | |
---|---|---|
committer | 2016-09-29 10:19:29 -0700 | |
commit | ec04fa3e7f77300dd840f03f1da47fdf2ff29fba (patch) | |
tree | a5f0b1f5c6b181dff57e58831853dafed374c64d | |
parent | 65eb095b3c380e777799f2ab36504b0bdac377bc (diff) |
Shard svd_op across files to improve compilation time.
Change: 134675069
-rw-r--r-- | tensorflow/core/kernels/svd_op_complex128.cc | 23 | ||||
-rw-r--r-- | tensorflow/core/kernels/svd_op_complex64.cc | 23 | ||||
-rw-r--r-- | tensorflow/core/kernels/svd_op_double.cc | 23 | ||||
-rw-r--r-- | tensorflow/core/kernels/svd_op_float.cc | 23 | ||||
-rw-r--r-- | tensorflow/core/kernels/svd_op_impl.h (renamed from tensorflow/core/kernels/svd_op.cc) | 13 |
5 files changed, 96 insertions, 9 deletions
diff --git a/tensorflow/core/kernels/svd_op_complex128.cc b/tensorflow/core/kernels/svd_op_complex128.cc new file mode 100644 index 0000000000..a0f39418ac --- /dev/null +++ b/tensorflow/core/kernels/svd_op_complex128.cc @@ -0,0 +1,23 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +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. +==============================================================================*/ + +#include "tensorflow/core/kernels/svd_op_impl.h" + +namespace tensorflow { + +REGISTER_LINALG_OP("Svd", (SvdOp<complex128>), complex128); +REGISTER_LINALG_OP("BatchSvd", (SvdOp<complex128>), complex128); + +} // namespace tensorflow diff --git a/tensorflow/core/kernels/svd_op_complex64.cc b/tensorflow/core/kernels/svd_op_complex64.cc new file mode 100644 index 0000000000..a8fd50c67d --- /dev/null +++ b/tensorflow/core/kernels/svd_op_complex64.cc @@ -0,0 +1,23 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +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. +==============================================================================*/ + +#include "tensorflow/core/kernels/svd_op_impl.h" + +namespace tensorflow { + +REGISTER_LINALG_OP("Svd", (SvdOp<complex64>), complex64); +REGISTER_LINALG_OP("BatchSvd", (SvdOp<complex64>), complex64); + +} // namespace tensorflow diff --git a/tensorflow/core/kernels/svd_op_double.cc b/tensorflow/core/kernels/svd_op_double.cc new file mode 100644 index 0000000000..539dae3a08 --- /dev/null +++ b/tensorflow/core/kernels/svd_op_double.cc @@ -0,0 +1,23 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +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. +==============================================================================*/ + +#include "tensorflow/core/kernels/svd_op_impl.h" + +namespace tensorflow { + +REGISTER_LINALG_OP("Svd", (SvdOp<double>), double); +REGISTER_LINALG_OP("BatchSvd", (SvdOp<double>), double); + +} // namespace tensorflow diff --git a/tensorflow/core/kernels/svd_op_float.cc b/tensorflow/core/kernels/svd_op_float.cc new file mode 100644 index 0000000000..03839aa49c --- /dev/null +++ b/tensorflow/core/kernels/svd_op_float.cc @@ -0,0 +1,23 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +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. +==============================================================================*/ + +#include "tensorflow/core/kernels/svd_op_impl.h" + +namespace tensorflow { + +REGISTER_LINALG_OP("Svd", (SvdOp<float>), float); +REGISTER_LINALG_OP("BatchSvd", (SvdOp<float>), float); + +} // namespace tensorflow diff --git a/tensorflow/core/kernels/svd_op.cc b/tensorflow/core/kernels/svd_op_impl.h index fc4f136241..a996b67c62 100644 --- a/tensorflow/core/kernels/svd_op.cc +++ b/tensorflow/core/kernels/svd_op_impl.h @@ -14,6 +14,10 @@ limitations under the License. ==============================================================================*/ // See docs in ../ops/linalg_ops.cc. +// +// This header file is used by the individual svd_*op*.cc files for registering +// individual kernels. A separate file is used for each instantiated kernel to +// improve compilation times. #include <algorithm> #include "third_party/eigen3/Eigen/SVD" @@ -96,13 +100,4 @@ class SvdOp : public LinearAlgebraOp<Scalar> { TF_DISALLOW_COPY_AND_ASSIGN(SvdOp); }; -REGISTER_LINALG_OP("Svd", (SvdOp<float>), float); -REGISTER_LINALG_OP("Svd", (SvdOp<double>), double); -REGISTER_LINALG_OP("Svd", (SvdOp<complex64>), complex64); -REGISTER_LINALG_OP("Svd", (SvdOp<complex128>), complex128); -REGISTER_LINALG_OP("BatchSvd", (SvdOp<float>), float); -REGISTER_LINALG_OP("BatchSvd", (SvdOp<double>), double); -REGISTER_LINALG_OP("BatchSvd", (SvdOp<complex64>), complex64); -REGISTER_LINALG_OP("BatchSvd", (SvdOp<complex128>), complex128); - } // namespace tensorflow |