Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tsl/platform/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ cc_library(
":strcat",
":stringpiece",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/types:span",
"@xla//xla/tsl/platform:logging",
"@xla//xla/tsl/platform:types",
],
Expand All @@ -196,6 +197,7 @@ cc_library(
deps = [
":platform",
":tstring",
"@com_google_absl//absl/strings:cord",
"@xla//xla/tsl/platform:types",
] + tsl_protobuf_deps(),
)
Expand Down Expand Up @@ -1073,6 +1075,7 @@ tsl_cc_test(
srcs = ["hash_test.cc"],
deps = [
":hash",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/platform:logging",
"@xla//xla/tsl/platform:test",
Expand Down Expand Up @@ -1248,6 +1251,7 @@ tsl_cc_test(
],
deps = [
":refcount",
"@com_google_absl//absl/log",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/platform:env",
"@xla//xla/tsl/platform:env_impl",
Expand Down Expand Up @@ -1319,6 +1323,7 @@ tsl_cc_test(
deps = [
":mutex",
":platform_port",
"@com_google_absl//absl/log",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/platform:env",
"@xla//xla/tsl/platform:env_time",
Expand All @@ -1334,6 +1339,7 @@ tsl_cc_test(
],
deps = [
":scanner",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/platform:test",
],
Expand All @@ -1347,6 +1353,8 @@ tsl_cc_test(
],
deps = [
":str_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/platform:test",
],
Expand Down Expand Up @@ -1404,6 +1412,8 @@ cc_library(
copts = tsl_copts(),
deps = [
":random",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@xla//xla/tsl/platform:env",
"@xla//xla/tsl/platform:errors",
Expand Down Expand Up @@ -1434,6 +1444,10 @@ tsl_cc_test(
deps = [
":retrying_file_system",
":str_util",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/lib/core:status_test_util",
"@xla//xla/tsl/platform:env_impl",
Expand All @@ -1448,6 +1462,8 @@ tsl_cc_test(
deps = [
":retrying_utils",
":str_util",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/lib/core:status_test_util",
Expand Down
1 change: 1 addition & 0 deletions tsl/platform/base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.

#include "tsl/platform/base64.h"

#include <cstdint>
#include <cstring>
#include <memory>

Expand Down
3 changes: 3 additions & 0 deletions tsl/platform/coding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ limitations under the License.

#include "tsl/platform/coding.h"

#include <cstdint>
#include <cstring>

#include "xla/tsl/platform/byte_order.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/stringpiece.h"
Expand Down
4 changes: 3 additions & 1 deletion tsl/platform/ctstring_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ limitations under the License.

#include "tsl/platform/ctstring.h"

#include <memory>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <string>

#include "xla/tsl/platform/test.h"
Expand Down
1 change: 1 addition & 0 deletions tsl/platform/denormal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.
// Testing configuration of denormal state.
#include "tsl/platform/denormal.h"

#include <cstdint>
#include <cstring>
#include <limits>

Expand Down
1 change: 1 addition & 0 deletions tsl/platform/fingerprint_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
#include "tsl/platform/fingerprint.h"

#include <array>
#include <cstdint>
#include <unordered_set>

#include "xla/tsl/platform/test.h"
Expand Down
5 changes: 4 additions & 1 deletion tsl/platform/hash_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ limitations under the License.

#include "tsl/platform/hash.h"

#include <map>
#include <cstddef>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>

#include "absl/strings/string_view.h"
#include "xla/tsl/platform/logging.h"
#include "xla/tsl/platform/test.h"
#include "xla/tsl/platform/test_benchmark.h"
Expand Down
2 changes: 2 additions & 0 deletions tsl/platform/integral_types_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include <cstdint>

#include "xla/tsl/platform/test.h"
#include "xla/tsl/platform/types.h"

Expand Down
3 changes: 3 additions & 0 deletions tsl/platform/numbers_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ limitations under the License.

#include "tsl/platform/numbers.h"

#include <cfloat>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <limits>
#include <string>

#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "xla/tsl/platform/test.h"
#include "xla/tsl/platform/types.h"

Expand Down
1 change: 1 addition & 0 deletions tsl/platform/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ limitations under the License.

#include <string>

#include "absl/types/span.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/stringpiece.h"

Expand Down
5 changes: 4 additions & 1 deletion tsl/platform/port_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include <condition_variable>
#include <cstddef>
#include <cstdint>
#include <ctime>

#include "absl/log/log.h"
#include "xla/tsl/platform/env_time.h"
#include "xla/tsl/platform/test.h"
#include "xla/tsl/platform/threadpool.h"
Expand Down
5 changes: 5 additions & 0 deletions tsl/platform/protobuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ limitations under the License.

#include "tsl/platform/protobuf.h"

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <limits>

namespace tsl {

const char* kProtobufInt64Typename = "::tensorflow::protobuf_int64";
Expand Down
1 change: 1 addition & 0 deletions tsl/platform/protobuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ limitations under the License.
#include <string>
#include <utility>

#include "absl/strings/cord.h"
#include "xla/tsl/platform/types.h"
#include "tsl/platform/platform.h"

Expand Down
4 changes: 4 additions & 0 deletions tsl/platform/protobuf_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include <cstddef>
#include <string>

#include "third_party/protobuf/message.h"
#include "third_party/protobuf/message_lite.h"
#include "third_party/protobuf/text_format.h"
#include "tsl/platform/protobuf.h"

namespace tsl {
Expand Down
4 changes: 4 additions & 0 deletions tsl/platform/refcount_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ limitations under the License.

#include "tsl/platform/refcount.h"

#include <atomic>
#include <utility>

#include "absl/log/log.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/test.h"
#include "xla/tsl/platform/threadpool.h"
Expand Down
14 changes: 12 additions & 2 deletions tsl/platform/retrying_file_system_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@ limitations under the License.

#include "tsl/platform/retrying_file_system.h"

#include <fstream>

#include <cstddef>
#include <cstdint>
#include <memory>
#include <tuple>
#include <utility>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/tsl/platform/test.h"
#include "tsl/platform/str_util.h"
Expand Down
3 changes: 3 additions & 0 deletions tsl/platform/retrying_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ limitations under the License.
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <functional>
#include <limits>

#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/time/time.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/errors.h"
Expand Down
1 change: 1 addition & 0 deletions tsl/platform/retrying_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.

#include <functional>

#include "absl/status/status.h"
#include "absl/time/time.h"
#include "xla/tsl/platform/status.h"

Expand Down
6 changes: 5 additions & 1 deletion tsl/platform/retrying_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ limitations under the License.
#include "tsl/platform/retrying_utils.h"

#include <cmath>
#include <fstream>
#include <cstdint>
#include <functional>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/time/time.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/tsl/platform/env.h"
Expand Down
2 changes: 2 additions & 0 deletions tsl/platform/scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ limitations under the License.

#include "tsl/platform/scanner.h"

#include "absl/strings/string_view.h"

namespace tsl {
namespace strings {

Expand Down
1 change: 1 addition & 0 deletions tsl/platform/scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
#include <string>

#include "absl/strings/ascii.h"
#include "absl/strings/strip.h"
#include "xla/tsl/platform/macros.h"
#include "tsl/platform/str_util.h"
#include "tsl/platform/stringpiece.h"
Expand Down
1 change: 1 addition & 0 deletions tsl/platform/scanner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.

#include "tsl/platform/scanner.h"

#include "absl/strings/string_view.h"
#include "xla/tsl/platform/test.h"

namespace tsl {
Expand Down
6 changes: 6 additions & 0 deletions tsl/platform/str_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ limitations under the License.

#include "tsl/platform/str_util.h"

#include <cstdint>
#include <vector>

#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "absl/strings/str_join.h"
#include "absl/strings/string_view.h"
#include "absl/strings/strip.h"
#include "xla/tsl/platform/test.h"

namespace tsl {
Expand Down
2 changes: 0 additions & 2 deletions tsl/platform/stringpiece_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ limitations under the License.

#include "tsl/platform/stringpiece.h"

#include <unordered_map>

#include "xla/tsl/platform/test.h"

namespace tsl {
Expand Down
4 changes: 3 additions & 1 deletion tsl/platform/stringprintf_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ limitations under the License.

#include "tsl/platform/stringprintf.h"

#include <string>
#include <cerrno>
#include <clocale>
#include <cstring>

#include "xla/tsl/platform/test.h"

Expand Down
4 changes: 3 additions & 1 deletion tsl/platform/tstring_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ limitations under the License.

#include "tsl/platform/tstring.h"

#include <memory>
#include <cstddef>
#include <sstream>
#include <string>
#include <utility>

#include "absl/strings/str_cat.h"
#include "xla/tsl/platform/test.h"
Expand Down
3 changes: 3 additions & 0 deletions tsl/platform/unbounded_work_queue_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ limitations under the License.

#include "tsl/platform/unbounded_work_queue.h"

#include <functional>
#include <memory>

#include "absl/memory/memory.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/test.h"
Expand Down