diff --git a/tensorflow/core/framework/op_kernel.h b/tensorflow/core/framework/op_kernel.h index 662b58e59f9..1e707b60b4b 100644 --- a/tensorflow/core/framework/op_kernel.h +++ b/tensorflow/core/framework/op_kernel.h @@ -1335,6 +1335,17 @@ class OpKernelContext { TF_DISALLOW_COPY_AND_ASSIGN(OpKernelContext); }; +template <> +const Eigen::ThreadPoolDevice& OpKernelContext::eigen_device() const; + +template <> +const Eigen::GpuDevice& OpKernelContext::eigen_device() const; + +#ifdef TENSORFLOW_USE_SYCL +template <> +const Eigen::SyclDevice& OpKernelContext::eigen_device() const; +#endif + // Register your OpKernel by specifying the Op's name, the device the // kernel runs on, any type attr constraints for this kernel, any // host-memory args, and the class to instantiate. Examples: diff --git a/tensorflow/lite/kernels/internal/spectrogram.h b/tensorflow/lite/kernels/internal/spectrogram.h index b885b9d7d2d..879dc1c9700 100644 --- a/tensorflow/lite/kernels/internal/spectrogram.h +++ b/tensorflow/lite/kernels/internal/spectrogram.h @@ -104,6 +104,30 @@ class Spectrogram { std::vector fft_double_working_area_; }; +// Explicit instantiations in spectrogram.cc. + +extern template bool Spectrogram::ComputeComplexSpectrogram( + const std::vector& input, + std::vector>>*); +extern template bool Spectrogram::ComputeComplexSpectrogram( + const std::vector& input, + std::vector>>*); +extern template bool Spectrogram::ComputeComplexSpectrogram( + const std::vector& input, + std::vector>>*); +extern template bool Spectrogram::ComputeComplexSpectrogram( + const std::vector& input, + std::vector>>*); + +extern template bool Spectrogram::ComputeSquaredMagnitudeSpectrogram( + const std::vector& input, std::vector>*); +extern template bool Spectrogram::ComputeSquaredMagnitudeSpectrogram( + const std::vector& input, std::vector>*); +extern template bool Spectrogram::ComputeSquaredMagnitudeSpectrogram( + const std::vector& input, std::vector>*); +extern template bool Spectrogram::ComputeSquaredMagnitudeSpectrogram( + const std::vector& input, std::vector>*); + } // namespace internal } // namespace tflite