-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HLO Componentization] Create hlo/tools sub-component (Phase I).
This CL takes care of 1. Migrating xla/tools --> xla/hlo/tools 2. Setting up build aliases for xla/tools ensuring external dependencies are still satisfied. Phase II will take care of migration of external projects dependencies from xla/tools --> xla/hlo/tools PiperOrigin-RevId: 681674893
- Loading branch information
1 parent
150b7ba
commit a10c329
Showing
8 changed files
with
155 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# Tools and utilities that aid in XLA development and usage. | ||
|
||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
load( | ||
"//xla:xla.bzl", | ||
"xla_cc_binary", | ||
) | ||
load("//xla/tsl:tsl.default.bzl", "filegroup") | ||
|
||
package( | ||
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], | ||
default_visibility = ["//xla:internal"], | ||
licenses = ["notice"], | ||
) | ||
|
||
# Filegroup used to collect source files for dependency checking. | ||
filegroup( | ||
name = "c_srcs", | ||
data = glob([ | ||
"**/*.cc", | ||
"**/*.h", | ||
]), | ||
visibility = ["//xla:internal"], | ||
) | ||
|
||
build_test( | ||
name = "hex_floats_to_packed_literal_build_test", | ||
targets = [ | ||
":hex_floats_to_packed_literal", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "hex_floats_to_packed_literal", | ||
srcs = ["hex_floats_to_packed_literal.cc"], | ||
deps = [ | ||
"//xla/tsl/lib/io:buffered_inputstream", | ||
"//xla/tsl/lib/io:random_inputstream", | ||
"//xla/tsl/util:command_line_flags", | ||
"@com_google_absl//absl/base", | ||
"@com_google_absl//absl/strings", | ||
"@tsl//tsl/platform:env", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:status", | ||
], | ||
) | ||
|
||
build_test( | ||
name = "show_literal_build_test", | ||
targets = [ | ||
":show_literal", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "show_literal", | ||
srcs = ["show_literal.cc"], | ||
deps = [ | ||
"//xla:literal", | ||
"//xla:types", | ||
"//xla:xla_data_proto_cc", | ||
"@tsl//tsl/platform:env", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:status", | ||
], | ||
) | ||
|
||
build_test( | ||
name = "convert_computation_build_test", | ||
targets = [ | ||
":convert_computation", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "convert_computation", | ||
srcs = ["convert_computation.cc"], | ||
deps = [ | ||
"//xla/service:hlo_proto_cc", | ||
"@tsl//tsl/platform:env", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:protobuf", | ||
"@tsl//tsl/platform:status", | ||
], | ||
) | ||
|
||
build_test( | ||
name = "hlo_module_metadata_processor_build_test", | ||
targets = [ | ||
":hlo_module_metadata_processor", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "hlo_module_metadata_processor", | ||
srcs = ["hlo_module_metadata_processor.cc"], | ||
deps = [ | ||
"//xla/service:hlo_proto_cc", | ||
"@com_google_absl//absl/container:flat_hash_map", | ||
"@com_google_absl//absl/strings", | ||
"@com_google_absl//absl/strings:str_format", | ||
"@tsl//tsl/platform:env", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:protobuf", | ||
"@tsl//tsl/platform:status", | ||
], | ||
) | ||
|
||
build_test( | ||
name = "show_text_literal_build_test", | ||
targets = [ | ||
":show_text_literal", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "show_text_literal", | ||
srcs = ["show_text_literal.cc"], | ||
deps = [ | ||
"//xla:literal", | ||
"//xla:text_literal_reader", | ||
"//xla:types", | ||
"//xla:xla_data_proto_cc", | ||
"@com_google_absl//absl/status:statusor", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:protobuf", | ||
], | ||
) | ||
|
||
build_test( | ||
name = "hlo_proto_to_json_build_test", | ||
targets = [ | ||
":hlo_proto_to_json", | ||
], | ||
) | ||
|
||
xla_cc_binary( | ||
name = "hlo_proto_to_json", | ||
srcs = ["hlo_proto_to_json.cc"], | ||
deps = [ | ||
"//xla:util", | ||
"//xla/service:hlo_proto_cc", | ||
"//xla/tsl/util:command_line_flags", | ||
"@com_google_absl//absl/status:statusor", | ||
"@tsl//tsl/platform:env", | ||
"@tsl//tsl/platform:logging", | ||
"@tsl//tsl/platform:platform_port", | ||
"@tsl//tsl/platform:status", | ||
], | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters