message: Add --cpu option to build_pip_package to build tensorflow_cpu and tf_nightly_cpu.
diff: @@ -227,6 +227,7 @@ function usage() {
  echo ""
  echo " Options:"
  echo " --project_name <name> set project name to name"
  + echo " --cpu build tensorflow_cpu"
  echo " --gpu build tensorflow_gpu"
  echo " --gpudirect build tensorflow_gpudirect"
  echo " --rocm build tensorflow_rocm"
  @@ -239,6 +240,7 @@ function main() {
  PKG_NAME_FLAG=""
  PROJECT_NAME=""
  GPU_BUILD=0
  + PROJECT_NAME_CPU=0
  ROCM_BUILD=0
  NIGHTLY_BUILD=0
  SRCDIR=""
  @@ -252,6 +254,15 @@ function main() {
  NIGHTLY_BUILD=1
  elif [[ "$1" == "--gpu" ]]; then
  GPU_BUILD=1
  + elif [[ "$1" == "--cpu" ]]; then
  + # Check that --gpu has not been passed.
  + if [[ ${GPU_BUILD} == "1" ]]; then
  + echo "Specifying both --cpu and --gpu to build_pip_package is not allowed."
  + usage
  + exit 1
  + done
  +
  + PROJECT_NAME_CPU=1
  elif [[ "$1" == "--gpudirect" ]]; then
  PKG_NAME_FLAG="--project_name tensorflow_gpudirect"
  elif [[ "$1" == "--rocm" ]]; then
  @@ -303,12 +314,16 @@ function main() {
  PKG_NAME_FLAG="--project_name tf_nightly_gpu"
  elif [[ ${NIGHTLY_BUILD} == "1" && ${ROCM_BUILD} == "1" ]]; then
  PKG_NAME_FLAG="--project_name tf_nightly_rocm"
  + elif [[ ${NIGHTLY_BUILD} == "1" && ${PROJECT_NAME_CPU} == "1" ]]; then
  + PKG_NAME_FLAG="--project_name tf_nightly_cpu"
  elif [[ ${NIGHTLY_BUILD} == "1" ]]; then
  PKG_NAME_FLAG="--project_name tf_nightly"
  elif [[ ${GPU_BUILD} == "1" ]]; then
  PKG_NAME_FLAG="--project_name tensorflow_gpu"
  elif [[ ${ROCM_BUILD} == "1" ]]; then
  PKG_NAME_FLAG="--project_name tensorflow_rocm"
  + elif [[ ${PROJECT_NAME_CPU} == "1" ]]; then
  + PKG_NAME_FLAG="--project_name tensorflow_cpu"
  fi
  build_wheel "$SRCDIR" "$DSTDIR" "$PKG_NAME_FLAG"
  