Shard svd_op across files to improve compilation time.

Change: 134675069
This commit is contained in:
A. Unique TensorFlower 2016-09-29 09:12:50 -08:00 committed by TensorFlower Gardener
parent 65eb095b3c
commit ec04fa3e7f
5 changed files with 96 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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