1load("//tensorflow/core/platform:rules_cc.bzl", "cc_library") 2 3# Experimental filesystem C APIs for TensorFlow. 4# Will be moved in proper place once all filesystems are converted to the 5# modular framework. 6load("//tensorflow:tensorflow.bzl", "tf_cc_test") 7 8package( 9 licenses = ["notice"], 10) 11 12# This is only for plugins 13cc_library( 14 name = "filesystem_interface", 15 hdrs = ["filesystem_interface.h"], 16 visibility = ["//visibility:public"], 17 deps = [ 18 "//tensorflow/c:tf_file_statistics", 19 "//tensorflow/c:tf_status", 20 ], 21) 22 23# Core TensorFlow depends on this, will be included in main library 24cc_library( 25 name = "modular_filesystem", 26 srcs = [ 27 "modular_filesystem.cc", 28 "modular_filesystem_registration.cc", 29 ], 30 hdrs = [ 31 "modular_filesystem.h", 32 "modular_filesystem_registration.h", 33 ], 34 # TODO(b/139060984): Visibility should be more restrictive once we 35 # convert to modular filesystems everywhere 36 visibility = ["//visibility:public"], 37 deps = [ 38 ":filesystem_interface", 39 "//tensorflow/c:tf_status_helper", 40 "//tensorflow/c:tf_status_internal", 41 "//tensorflow/core:ptr_util", 42 "//tensorflow/core/platform:env", 43 "//tensorflow/core/platform:errors", 44 "//tensorflow/core/platform:status", 45 ], 46) 47 48# Compliance test for modules and for interface 49tf_cc_test( 50 name = "modular_filesystem_test", 51 size = "small", 52 srcs = ["modular_filesystem_test.cc"], 53 linkopts = ["-ldl"], 54 tags = [ 55 "manual", # Requires DSOs as arguments, eventual setup 56 "notap", # b/139060984, requires implementing modular support for Google filesystem 57 ], 58 deps = [ 59 ":modular_filesystem", 60 "//tensorflow/core:framework_internal", 61 "//tensorflow/core/lib/io:path", 62 "//tensorflow/core/platform:env", 63 "//tensorflow/core/platform:errors", 64 "//tensorflow/core/platform:stacktrace_handler", 65 "//tensorflow/core/platform:test", 66 ], 67) 68