xref: /aosp_15_r20/external/tensorflow/tensorflow/core/tfrt/mla/mla_test_utils.h (revision b6fb3261f9314811a0f4371741dbb8839866f948)
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 #ifndef TENSORFLOW_CORE_TFRT_MLA_MLA_UTILS_H_
16 #define TENSORFLOW_CORE_TFRT_MLA_MLA_UTILS_H_
17 
18 // This file contains stub implementations for Google internal MLA APIs.
19 
20 #include <string>
21 #include <unordered_set>
22 #include <vector>
23 
24 #include "absl/strings/string_view.h"
25 #include "tensorflow/core/platform/status.h"
26 #include "tensorflow/core/platform/errors.h"
27 
28 namespace tensorflow {
29 namespace tfrt_stub {
30 
CopySavedModelFromTestDataToTempDir(absl::string_view tf_dir,absl::string_view saved_model_name)31 inline std::string CopySavedModelFromTestDataToTempDir(
32     absl::string_view tf_dir, absl::string_view saved_model_name) {
33   return "";
34 }
35 
ConvertSavedModelAndAddToMla(absl::string_view saved_model_path,const int saved_model_version,const std::unordered_set<std::string> & tags,const std::vector<std::string> & entry_points,absl::string_view mla_module_name)36 inline Status ConvertSavedModelAndAddToMla(
37     absl::string_view saved_model_path, const int saved_model_version,
38     const std::unordered_set<std::string>& tags,
39     const std::vector<std::string>& entry_points,
40     absl::string_view mla_module_name) {
41   return tensorflow::errors::Unimplemented("Not supported in OSS");
42 }
43 
44 }  // namespace tfrt_stub
45 }  // namespace tensorflow
46 
47 #endif  // TENSORFLOW_CORE_TFRT_MLA_MLA_UTILS_H_
48