From c56ad2905ac3dc113f855a65087d828780a6fcd8 Mon Sep 17 00:00:00 2001 From: Filip Matzner Date: Mon, 1 Mar 2021 15:53:06 +0100 Subject: [PATCH] Add local_ram_resources parameter to cmake --- tensorflow_cc/CMakeLists.txt | 1 + tensorflow_cc/cmake/build_tensorflow.sh.in | 1 + 2 files changed, 2 insertions(+) diff --git a/tensorflow_cc/CMakeLists.txt b/tensorflow_cc/CMakeLists.txt index 0739ad4..7cdc067 100644 --- a/tensorflow_cc/CMakeLists.txt +++ b/tensorflow_cc/CMakeLists.txt @@ -8,6 +8,7 @@ project( # If enabled, bazel has to be installed. option(ALLOW_CUDA "Try to find and use CUDA." ON) option(REQUIRE_CUDA "Make sure to find and use CUDA (implies ALLOW_CUDA)." OFF) +set(LOCAL_RAM_RESOURCES 4096 CACHE STRING "The amount of local RAM resources passed to bazel (e.g., 4096).") set(TENSORFLOW_TAG "v${version}" CACHE STRING "The tensorflow release tag to be checked out (default v${version}).") set(TARGET_CXX_STANDARD "cxx_std_11" CACHE STRING "C++ standard to be enforced when linking to TensorflowCC targets (e.g., cxx_std_11).") diff --git a/tensorflow_cc/cmake/build_tensorflow.sh.in b/tensorflow_cc/cmake/build_tensorflow.sh.in index 8c1c0b0..3ec551a 100755 --- a/tensorflow_cc/cmake/build_tensorflow.sh.in +++ b/tensorflow_cc/cmake/build_tensorflow.sh.in @@ -99,6 +99,7 @@ fi ./configure bazel build --config=opt \ --config=monolithic \ + --local_ram_resources=@LOCAL_RAM_RESOURCES@ \ $cuda_config_opts \ tensorflow:libtensorflow_cc.so \ tensorflow:install_headers