Skip to content

Commit eb90e69

Browse files
authored
Add support for dynamically loaded DAOS libraries (#4)
Currently if DAOS libraries are not installed on a node, the libtensorflow_io_plugins.so will fail to load due to unsatisfied externals, and all modular filesystems are then unusable, not just DFS. This PR changes the DFS plugin to dynamically load the DAOS libraries so that the DFS filesystem is available if DAOS is installed, but the other modular filesystems are still available if DAOS is not installed. The checks for the DAOS libraries and the daos_init() call are now done at filesystem registration time, not as part of each function call in the filesystem API. If the libraries are not installed then the DFS filesystem will not be not registered, and no calls into DFS functions will ever occur. In this case tensorflow will just report "File system scheme 'dfs' not implemented" when a "dfs://" path is used. A number of separate functions existed each of which was only called once as part of DFS destruction, these were combined into the DFS destructor for simplicity. Similar recombinations were done to simplify DFS construction. Signed-off-by: Kevan Rehm <kevan.rehm@hpe.com>
1 parent b0a7b7d commit eb90e69

File tree

6 files changed

+367
-189
lines changed

6 files changed

+367
-189
lines changed

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ http_archive(
293293
http_archive(
294294
name = "daos",
295295
build_file = "//third_party:daos.BUILD",
296-
sha256 = "6fb24cf72a1d07d9f9efcd738bba210e927b25526a5f01763ad39d0aabee5f76",
297-
strip_prefix = "daos-1.3.106-tb",
296+
sha256 = "9789a5a0065cfa4249105f1676b9eba89f68b54bc03083140549b7a8a8f615d3",
297+
strip_prefix = "daos-2.0.2",
298298
urls = [
299-
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/daos-stack/daos/archive/refs/tags/v1.3.106-tb.tar.gz",
300-
"https://github.com/daos-stack/daos/archive/refs/tags/v1.3.106-tb.tar.gz",
299+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/daos-stack/daos/archive/refs/tags/v2.0.2.tar.gz",
300+
"https://github.com/daos-stack/daos/archive/refs/tags/v2.0.2.tar.gz",
301301
],
302302
)
303303

tensorflow_io/core/filesystems/dfs/BUILD

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ cc_library(
1515
"dfs_utils.h",
1616
],
1717
copts = tf_io_copts(),
18-
linkopts = [
19-
"-ldaos",
20-
"-luuid",
21-
"-ldfs",
22-
"-lduns",
23-
],
2418
linkstatic = True,
2519
deps = [
2620
"//tensorflow_io/core/filesystems:filesystem_plugins_header",
21+
"@com_google_absl//absl/strings",
22+
"@com_google_absl//absl/synchronization",
2723
"@daos",
2824
],
2925
alwayslink = 1,

0 commit comments

Comments
 (0)