File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -955,8 +955,7 @@ cc_library(
955955 hdrs = ["casts.h" ],
956956 deps = [
957957 ":platform" ,
958- "@com_google_absl//absl/base" ,
959- ],
958+ ] + tf_platform_deps ("casts" ),
960959)
961960
962961cc_library (
Original file line number Diff line number Diff line change @@ -16,15 +16,16 @@ limitations under the License.
1616#ifndef TENSORFLOW_TSL_PLATFORM_CASTS_H_
1717#define TENSORFLOW_TSL_PLATFORM_CASTS_H_
1818
19- #include " absl/base/casts.h"
2019#include "tsl/platform/platform.h"
2120
22- namespace tensorflow {
23- using ::absl::down_cast;
24- }
25-
26- namespace tsl {
27- using ::absl::down_cast;
28- }
21+ #if defined(PLATFORM_GOOGLE )
22+ #include "xla/tsl/platform/google/casts.h" // IWYU pragma: export
23+ #elif defined(PLATFORM_POSIX ) || defined(PLATFORM_POSIX_ANDROID ) || \
24+ defined(PLATFORM_GOOGLE_ANDROID ) || defined(PLATFORM_POSIX_IOS ) || \
25+ defined(PLATFORM_GOOGLE_IOS ) || defined(PLATFORM_WINDOWS )
26+ #include "xla/tsl/platform/default/casts.h" // IWYU pragma: export
27+ #else
28+ #error Define the appropriate PLATFORM_<foo> macro for this platform
29+ #endif
2930
3031#endif // TENSORFLOW_TSL_PLATFORM_CASTS_H_
You can’t perform that action at this time.
0 commit comments