1 # Legacy command-line flags for the XLA libraries. 2 3 # Please do not add more flags to this package. 4 5 # The XLA libraries were written in an environment that allowed command-line 6 # flags to be scattered freely throughout the libraries. This model, while 7 # initially convenient, leads to a proliferation in unused command-line flags 8 # in tests and binaries, and serious problems in servers, where one might wish 9 # parameters to be different in independent RPC calls to the same routine. 10 # 11 # Please don't add more flags. If you're a library author, pass options and 12 # parameters explicitly through the library's interface. 13 14 package(default_visibility = ["//tensorflow:internal"]) 15 16 licenses(["notice"]) # Apache 2.0 17 18 load("//tensorflow:tensorflow.bzl", "tf_cc_test") 19 20 cc_library( 21 name = "parse_flags_from_env", 22 srcs = ["parse_flags_from_env.cc"], 23 hdrs = ["parse_flags_from_env.h"], 24 deps = 25 [ 26 "//tensorflow/compiler/xla:types", 27 "//tensorflow/core:framework_internal", 28 "//tensorflow/core:lib", 29 ], 30 ) 31 32 tf_cc_test( 33 name = "parse_flags_from_env_test", 34 srcs = ["parse_flags_from_env_test.cc"], 35 deps = 36 [ 37 ":parse_flags_from_env", 38 "//tensorflow/compiler/xla:types", 39 "//tensorflow/core:framework_internal", 40 "//tensorflow/core:lib", 41 "//tensorflow/core:test", 42 ], 43 ) 44 45 cc_library( 46 name = "debug_options_flags", 47 srcs = [ 48 "debug_options_flags.cc", 49 "debug_options_parsers.h", 50 ], 51 hdrs = ["debug_options_flags.h"], 52 deps = 53 [ 54 ":parse_flags_from_env", 55 "//tensorflow/compiler/xla:xla_proto", 56 "//tensorflow/compiler/xla/service:hlo", 57 "//tensorflow/core:framework_internal", 58 "//tensorflow/core:lib", 59 ], 60 ) 61 62 tf_cc_test( 63 name = "debug_options_parsers_test", 64 size = "small", 65 srcs = [ 66 "debug_options_parsers.h", 67 "debug_options_parsers_test.cc", 68 ], 69 deps = 70 [ 71 "//tensorflow/compiler/xla:xla_proto", 72 "//tensorflow/compiler/xla/service:hlo", 73 "//tensorflow/core:framework_internal", 74 "//tensorflow/core:lib", 75 "//tensorflow/core:test", 76 ], 77 ) 78 79 # ----------------------------------------------------------------------------- 80 81 filegroup( 82 name = "all_files", 83 srcs = glob( 84 ["**/*"], 85 exclude = [ 86 "**/METADATA", 87 "**/OWNERS", 88 ], 89 ), 90 visibility = ["//tensorflow:__subpackages__"], 91 ) 92