light_outside_compilation.cc
imports tensorflow/core/platform/env.himports tensorflow/core/platform/refcount.h
SHA-256e91945edb5c38304a6fdceb537c9e775c1ee91da3f7062365255310fbfbeaa98
MaleculeMd(In₈)
Evidence
1/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/compiler/tf2xla/kernels/light_outside_compilation.h"
17
18#include <cstddef>
19#include <cstdint>
20#include <deque>
21#include <memory>
22#include <string>
23#include <utility>
24#include <vector>
25
26#include "absl/algorithm/container.h"
27#include "absl/base/const_init.h" // NOLINT incorrectly flagged as unused
28#include "absl/base/thread_annotations.h"
29#include "absl/cleanup/cleanup.h"
30#include "absl/container/flat_hash_map.h"
31#include "absl/container/inlined_vector.h"
32#include "absl/log/check.h"
33#include "absl/log/log.h"
34#include "absl/memory/memory.h"
35#include "absl/status/status.h"
36#include "absl/strings/escaping.h"
37#include "absl/strings/match.h"
38#include "absl/strings/str_cat.h"
39#include "absl/strings/str_format.h"
40#include "absl/strings/str_join.h"
41#include "absl/strings/string_view.h"
42#include "absl/synchronization/mutex.h"
43#include "absl/types/span.h"
44#include "tensorflow/compiler/tf2xla/kernels/callback.pb.h"
45#include "tensorflow/compiler/tf2xla/shape_util.h"
46#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
47#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
48#include "xla/hlo/builder/xla_builder.h"
49#include "xla/layout_util.h"
50#include "xla/service/custom_call_status.h"
51#include "xla/service/custom_call_target_registry.h"
52#include "xla/service/hlo.pb.h"
53#include "xla/shape.h"
54#include "xla/shape_util.h"
55#include "xla/status_macros.h"
56#include "xla/stream_executor/device_memory.h"
57#include "xla/stream_executor/platform.h"
58#include "xla/stream_executor/platform_manager.h"
134:52… names to map to the same
135 // Instantiation (so that if the same op with the same shape appears 10 times
136 // in a model, they all have the same logical TfCallbackData.)
137 callback_data.mutable_op()->clear_name();
138
139 std::string se …