xref: /aosp_15_r20/external/tensorflow/tensorflow/core/common_runtime/cost_constants.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 
16 #ifndef TENSORFLOW_CORE_COMMON_RUNTIME_COST_CONSTANTS_H_
17 #define TENSORFLOW_CORE_COMMON_RUNTIME_COST_CONSTANTS_H_
18 
19 namespace tensorflow {
20 
21 // Types of per-request cost.
22 inline constexpr char kTpuCostName[] = "tpu";
23 inline constexpr char kGcuCostName[] = "gcu";
24 inline constexpr char kNoOpCostName[] = "no_op";
25 
26 // Each type of per-request cost could have the following versions.
27 //
28 // A server may have costs that cannot be directly attributed to a specific
29 // query. Each request will be assigned a portion of it, and the cost ends with
30 // '_with_smear" includes this part.
31 inline constexpr char kWithSmearSuffix[] = "_with_smear";
32 inline constexpr char kNoSmearSuffix[] = "_no_smear";
33 
34 // Full names of per-request cost.
35 inline constexpr char kTpuWithSmearCostName[] = "tpu_with_smear";
36 inline constexpr char kTpuNoSmearCostName[] = "tpu_no_smear";
37 inline constexpr char kGcuWithSmearCostName[] = "gcu_with_smear";
38 inline constexpr char kGcuNoSmearCostName[] = "gcu_no_smear";
39 
40 }  // namespace tensorflow
41 
42 #endif  // TENSORFLOW_CORE_COMMON_RUNTIME_COST_CONSTANTS_H_
43