aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/third_party/mpi/mpi.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/third_party/mpi/mpi.bzl')
-rw-r--r--tensorflow/third_party/mpi/mpi.bzl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tensorflow/third_party/mpi/mpi.bzl b/tensorflow/third_party/mpi/mpi.bzl
new file mode 100644
index 0000000000..38ce91c4d0
--- /dev/null
+++ b/tensorflow/third_party/mpi/mpi.bzl
@@ -0,0 +1,17 @@
+#OpenMPI and Mvapich/mpich require different headers
+#based on the configuration options return one or the other
+
+def mpi_hdr():
+ MPI_LIB_IS_OPENMPI=True
+ hdrs = []
+ if MPI_LIB_IS_OPENMPI:
+ hdrs = ["mpi.h", "mpi_portable_platform.h"] #When using OpenMPI
+ else:
+ hdrs = ["mpi.h", "mpio.h", "mpicxx.h"] #When using MVAPICH
+ return hdrs
+
+def if_mpi(if_true, if_false = []):
+ return select({
+ "//tensorflow:with_mpi_support": if_true,
+ "//conditions:default": if_false
+ })