Split cwise igammas GPU code into multiple files

This file was a bottleneck during compilation, often taking many minutes to compile. In local testing this change reduces the wall-clock build time for the affected kernels from 141s to 87s.

PiperOrigin-RevId: 229179013
This commit is contained in:
James Keeling 2019-01-14 07:28:18 -08:00 committed by TensorFlower Gardener
parent ad683f866b
commit 471b523d93
2 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,29 @@
/* Copyright 2018 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.
==============================================================================*/
#if GOOGLE_CUDA
#include "tensorflow/core/kernels/cwise_ops_gpu_common.cu.h"
#include "tensorflow/core/kernels/cwise_ops_gpu_gradients.cu.h"
namespace tensorflow {
namespace functor {
DEFINE_BINARY1(igamma, double);
DEFINE_BINARY1(igamma_grad_a, double);
DEFINE_BINARY1(igammac, double);
} // namespace functor
} // namespace tensorflow
#endif // GOOGLE_CUDA

View File

@ -20,9 +20,9 @@ limitations under the License.
namespace tensorflow {
namespace functor {
DEFINE_BINARY2(igamma, float, double);
DEFINE_BINARY2(igamma_grad_a, float, double);
DEFINE_BINARY2(igammac, float, double);
DEFINE_BINARY1(igamma, float);
DEFINE_BINARY1(igamma_grad_a, float);
DEFINE_BINARY1(igammac, float);
} // namespace functor
} // namespace tensorflow