1 /* Copyright 2021 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 // This file declares RuntimeFallbackOpHandler, responsible for running TFRT ops 17 // on Tensorflow. 18 19 #ifndef TENSORFLOW_CORE_RUNTIME_FALLBACK_RUNTIME_RUNTIME_FALLBACK_OP_HANDLER_H_ 20 #define TENSORFLOW_CORE_RUNTIME_FALLBACK_RUNTIME_RUNTIME_FALLBACK_OP_HANDLER_H_ 21 22 #include <memory> 23 24 #include "tfrt/core_runtime/core_runtime.h" // from @tf_runtime 25 #include "tfrt/core_runtime/op_handler.h" // from @tf_runtime 26 #include "tfrt/host_context/execution_context.h" // from @tf_runtime 27 28 namespace tensorflow { 29 namespace tfd { 30 31 llvm::Expected<tfrt::OpHandler*> CreateRuntimeFallbackOpHandler( 32 tfrt::CoreRuntime* runtime, tfrt::string_view tf_device_name); 33 } // namespace tfd 34 } // namespace tensorflow 35 36 #endif // TENSORFLOW_CORE_RUNTIME_FALLBACK_RUNTIME_RUNTIME_FALLBACK_OP_HANDLER_H_ 37