Skip to content

Commit 09cc2b9

Browse files
yueshengyscopybara-github
authored andcommitted
Fix headers in PjRt.
PiperOrigin-RevId: 657775121
1 parent 712eb90 commit 09cc2b9

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

xla/pjrt/BUILD

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,16 @@ cc_library(
219219
"@com_google_absl//absl/container:flat_hash_map",
220220
"@com_google_absl//absl/container:inlined_vector",
221221
"@com_google_absl//absl/functional:any_invocable",
222+
"@com_google_absl//absl/log",
223+
"@com_google_absl//absl/log:check",
222224
"@com_google_absl//absl/status",
223225
"@com_google_absl//absl/status:statusor",
224226
"@com_google_absl//absl/strings",
225227
"@com_google_absl//absl/synchronization",
226228
"@com_google_absl//absl/types:span",
227229
"@llvm-project//mlir:IR",
228230
"@tsl//tsl/platform:errors",
231+
"@tsl//tsl/platform:statusor",
229232
],
230233
)
231234

@@ -471,6 +474,7 @@ cc_library(
471474
deps = [
472475
":event_pool",
473476
":host_callback",
477+
":host_memory_spaces",
474478
":local_device_state",
475479
":metrics",
476480
":mlir_to_hlo",
@@ -495,7 +499,6 @@ cc_library(
495499
"//xla/client:local_client",
496500
"//xla/client:xla_computation",
497501
"//xla/hlo/ir:hlo",
498-
"//xla/pjrt:host_memory_spaces",
499502
"//xla/pjrt/distributed:protocol_proto_cc",
500503
"//xla/service:compiler",
501504
"//xla/service:computation_layout",
@@ -516,6 +519,7 @@ cc_library(
516519
"@com_google_absl//absl/container:flat_hash_set",
517520
"@com_google_absl//absl/container:inlined_vector",
518521
"@com_google_absl//absl/functional:any_invocable",
522+
"@com_google_absl//absl/log:check",
519523
"@com_google_absl//absl/status",
520524
"@com_google_absl//absl/status:statusor",
521525
"@com_google_absl//absl/strings",
@@ -846,12 +850,28 @@ cc_library(
846850
visibility = ["//visibility:public"],
847851
deps = [
848852
":pjrt_client",
853+
":pjrt_common",
854+
":pjrt_compiler",
855+
":pjrt_executable",
849856
":pjrt_future",
857+
"//xla:literal",
858+
"//xla:shape_util",
859+
"//xla:util",
860+
"//xla/client:xla_computation",
861+
"//xla/hlo/ir:hlo",
862+
"//xla/service:computation_placer_hdr",
863+
"//xla/service:hlo_cost_analysis",
850864
"@com_google_absl//absl/base:core_headers",
851865
"@com_google_absl//absl/container:flat_hash_map",
852866
"@com_google_absl//absl/container:flat_hash_set",
867+
"@com_google_absl//absl/functional:any_invocable",
853868
"@com_google_absl//absl/log:check",
869+
"@com_google_absl//absl/status",
870+
"@com_google_absl//absl/status:statusor",
871+
"@com_google_absl//absl/strings:string_view",
854872
"@com_google_absl//absl/synchronization",
873+
"@com_google_absl//absl/types:span",
874+
"@tsl//tsl/platform:casts",
855875
"@tsl//tsl/platform:errors",
856876
],
857877
)

xla/pjrt/pjrt_client.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ limitations under the License.
3131
#include "absl/container/flat_hash_map.h"
3232
#include "absl/container/inlined_vector.h"
3333
#include "absl/functional/any_invocable.h"
34+
#include "absl/log/check.h"
35+
#include "absl/log/log.h"
3436
#include "absl/status/status.h"
3537
#include "absl/status/statusor.h"
38+
#include "absl/strings/str_cat.h"
3639
#include "absl/strings/string_view.h"
3740
#include "absl/synchronization/mutex.h"
3841
#include "absl/synchronization/notification.h"
@@ -55,6 +58,7 @@ limitations under the License.
5558
#include "xla/util.h"
5659
#include "xla/xla_data.pb.h"
5760
#include "tsl/platform/errors.h"
61+
#include "tsl/platform/statusor.h"
5862

5963
// API notes:
6064
// PjRt stands for "Pretty much Just another RunTime".

xla/pjrt/pjrt_stream_executor_client.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ limitations under the License.
3333
#include "absl/container/flat_hash_set.h"
3434
#include "absl/container/inlined_vector.h"
3535
#include "absl/functional/any_invocable.h"
36+
#include "absl/log/check.h"
3637
#include "absl/status/status.h"
3738
#include "absl/status/statusor.h"
3839
#include "absl/strings/str_cat.h"

xla/pjrt/tf_pjrt_client.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616
#ifndef XLA_PJRT_TF_PJRT_CLIENT_H_
1717
#define XLA_PJRT_TF_PJRT_CLIENT_H_
1818

19+
#include <cstddef>
20+
#include <cstdint>
1921
#include <functional>
2022
#include <memory>
2123
#include <optional>
@@ -26,9 +28,26 @@ limitations under the License.
2628
#include "absl/base/thread_annotations.h"
2729
#include "absl/container/flat_hash_map.h"
2830
#include "absl/container/flat_hash_set.h"
31+
#include "absl/functional/any_invocable.h"
32+
#include "absl/status/status.h"
33+
#include "absl/status/statusor.h"
34+
#include "absl/strings/string_view.h"
2935
#include "absl/synchronization/mutex.h"
36+
#include "absl/types/span.h"
37+
#include "xla/client/xla_computation.h"
38+
#include "xla/hlo/ir/hlo_module.h"
39+
#include "xla/layout.h"
40+
#include "xla/literal.h"
3041
#include "xla/pjrt/pjrt_client.h"
42+
#include "xla/pjrt/pjrt_common.h"
43+
#include "xla/pjrt/pjrt_compiler.h"
44+
#include "xla/pjrt/pjrt_executable.h"
3145
#include "xla/pjrt/pjrt_future.h"
46+
#include "xla/service/computation_placer.h"
47+
#include "xla/service/hlo_cost_analysis.h"
48+
#include "xla/shape.h"
49+
#include "xla/util.h"
50+
#include "tsl/platform/casts.h"
3251
#include "tsl/platform/errors.h"
3352

3453
namespace xla {

xla/python/py_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ limitations under the License.
3434
#include "absl/status/statusor.h"
3535
#include "absl/strings/str_cat.h"
3636
#include "absl/strings/string_view.h"
37-
#include "absl/synchronization/mutex.h"
3837
#include "absl/types/span.h"
3938
#include "llvm/Support/Casting.h"
4039
#include "mlir/IR/BuiltinOps.h"
@@ -67,6 +66,7 @@ limitations under the License.
6766
#include "xla/python/ifrt/hlo/hlo_program.h"
6867
#include "xla/python/ifrt/host_callback.h"
6968
#include "xla/python/ifrt/memory.h"
69+
#include "xla/python/ifrt/program.h"
7070
#include "xla/python/nb_absl_span.h" // IWYU pragma: keep
7171
#include "xla/python/nb_class_ptr.h"
7272
#include "xla/python/nb_numpy.h"

0 commit comments

Comments
 (0)