diff --git a/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_import_test.sh b/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_import_test.sh index acf91ce1398..bdfe6a3aba6 100644 --- a/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_import_test.sh +++ b/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_import_test.sh @@ -10,7 +10,7 @@ set -e -TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" MODEL_NAME="$1"; shift diff --git a/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_value_test.sh b/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_value_test.sh index 7794abbc226..d0f55fd5d72 100644 --- a/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_value_test.sh +++ b/circle-mlir/circle-mlir/tools-test/circle-impexp-test/run_value_test.sh @@ -12,7 +12,7 @@ set -e -TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VENV_PATH="$1"; shift MODEL_NAME="$1"; shift diff --git a/circle-mlir/circle-mlir/tools-test/gen-onnx/run_gen_onnx.sh b/circle-mlir/circle-mlir/tools-test/gen-onnx/run_gen_onnx.sh index 434d45a25b4..72cf33187c2 100644 --- a/circle-mlir/circle-mlir/tools-test/gen-onnx/run_gen_onnx.sh +++ b/circle-mlir/circle-mlir/tools-test/gen-onnx/run_gen_onnx.sh @@ -10,7 +10,7 @@ # model_name : name of model # onnx_name : name of onnx file -THIS_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +THIS_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" PY_SCRIPT_PATH="${THIS_SCRIPT_PATH}/run_gen_onnx.py" VENV_PATH="$1"; shift diff --git a/circle-mlir/circle-mlir/tools-test/onnx2circle-rewrite-test/run_circle_ops_test.sh b/circle-mlir/circle-mlir/tools-test/onnx2circle-rewrite-test/run_circle_ops_test.sh index c6d89450b79..94fc8bf8ce7 100644 --- a/circle-mlir/circle-mlir/tools-test/onnx2circle-rewrite-test/run_circle_ops_test.sh +++ b/circle-mlir/circle-mlir/tools-test/onnx2circle-rewrite-test/run_circle_ops_test.sh @@ -10,7 +10,7 @@ set -e -TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VENV_PATH="$1"; shift RUN_PATH="$1"; shift diff --git a/circle-mlir/circle-mlir/tools-test/onnx2circle-value-test/run_value_test.sh b/circle-mlir/circle-mlir/tools-test/onnx2circle-value-test/run_value_test.sh index 9d5a44eccf6..30cf6707a8d 100644 --- a/circle-mlir/circle-mlir/tools-test/onnx2circle-value-test/run_value_test.sh +++ b/circle-mlir/circle-mlir/tools-test/onnx2circle-value-test/run_value_test.sh @@ -13,7 +13,7 @@ set -e -TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VENV_PATH="$1"; shift MODEL_NAME="$1"; shift diff --git a/circle-mlir/circle-mlir/tools/one-import-onnx-ext/one-import-onnx-ext b/circle-mlir/circle-mlir/tools/one-import-onnx-ext/one-import-onnx-ext index a6587ed0e0b..60554048811 100644 --- a/circle-mlir/circle-mlir/tools/one-import-onnx-ext/one-import-onnx-ext +++ b/circle-mlir/circle-mlir/tools/one-import-onnx-ext/one-import-onnx-ext @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/circle-mlir/infra/overlay/prepare-venv b/circle-mlir/infra/overlay/prepare-venv index da5f5f7e249..6d813063e8a 100644 --- a/circle-mlir/infra/overlay/prepare-venv +++ b/circle-mlir/infra/overlay/prepare-venv @@ -34,7 +34,7 @@ fi set -e -DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" if [[ -z "$VENV_NAME" ]]; then VENV_NAME="venv" fi diff --git a/circle-mlir/infra/tools/gen-coverage-report b/circle-mlir/infra/tools/gen-coverage-report index 8d120dd0ba0..63463c3d75e 100644 --- a/circle-mlir/infra/tools/gen-coverage-report +++ b/circle-mlir/infra/tools/gen-coverage-report @@ -6,7 +6,7 @@ # COVERAGE_PATH : path where coverage report is generated, # default is ${PROJECT_PATH}/${COVERAGE_RPATH} -PROJECT_PATH="$(cd $(dirname ${BASH_SOURCE[0]})/../.. && pwd)" +PROJECT_PATH="$(cd $(dirname ${BASH_SOURCE[0]})/../.. >/dev/null && pwd)" # Set BUILD_WORKSPACE_RPATH with default 'build/coverage' if not set BUILD_WORKSPACE_RPATH="${BUILD_WORKSPACE_RPATH:-build/coverage}" diff --git a/compiler/circle-part-value-test/part_eval_all.sh b/compiler/circle-part-value-test/part_eval_all.sh index ae8ae473166..df06c911480 100755 --- a/compiler/circle-part-value-test/part_eval_all.sh +++ b/compiler/circle-part-value-test/part_eval_all.sh @@ -10,7 +10,7 @@ # work_dir : artifacts directoy where test materials exist # venv_dir : python virtual environment home directory -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/part_eval_one.py" WORKDIR="$1"; shift VIRTUALENV="$1"; shift @@ -25,7 +25,7 @@ for TESTCASE in "$@"; do # for simplicity, folder uses same ${TESTCASE} TESTCASE_FOLDER="${WORKDIR}/${TESTCASE}" - + PASSED_TAG="${TESTCASE_FOLDER}.passed" rm -f "${PASSED_TAG}" diff --git a/compiler/circle-quantizer-dredd-recipe-test/testall.sh b/compiler/circle-quantizer-dredd-recipe-test/testall.sh index e5d5cf2b875..c4568593011 100755 --- a/compiler/circle-quantizer-dredd-recipe-test/testall.sh +++ b/compiler/circle-quantizer-dredd-recipe-test/testall.sh @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then exit 255 fi -WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" CONFIG_PATH="$1"; shift RESOURCE_DIR="$1"; shift diff --git a/compiler/circle-resizer-dredd-recipe-test/testall.sh b/compiler/circle-resizer-dredd-recipe-test/testall.sh index 18f47137c13..141fe34ecb7 100755 --- a/compiler/circle-resizer-dredd-recipe-test/testall.sh +++ b/compiler/circle-resizer-dredd-recipe-test/testall.sh @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then exit 255 fi -WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" CONFIG_PATH="$1"; shift RESOURCE_DIR="$1"; shift diff --git a/compiler/circle2circle-dredd-recipe-test/testall.sh b/compiler/circle2circle-dredd-recipe-test/testall.sh index 94831d12c45..0cee32dbe94 100755 --- a/compiler/circle2circle-dredd-recipe-test/testall.sh +++ b/compiler/circle2circle-dredd-recipe-test/testall.sh @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then exit 255 fi -WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null >/dev/null && pwd )" CONFIG_PATH="$1"; shift RESOURCE_DIR="$1"; shift diff --git a/compiler/luci-pass-value-test/eval_driver.sh b/compiler/luci-pass-value-test/eval_driver.sh index 848b6419af2..afa394352b6 100755 --- a/compiler/luci-pass-value-test/eval_driver.sh +++ b/compiler/luci-pass-value-test/eval_driver.sh @@ -11,7 +11,7 @@ # venv_dir : python virtual environment home directory # intp_dir : path to luci_eval_driver from luci-eval-driver -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/eval_result_verifier.py" BINDIR="$1"; shift WORKDIR="$1"; shift diff --git a/compiler/luci-value-test/evalverify.sh b/compiler/luci-value-test/evalverify.sh index 3d209117651..5e07db75b17 100755 --- a/compiler/luci-value-test/evalverify.sh +++ b/compiler/luci-value-test/evalverify.sh @@ -11,7 +11,7 @@ # venv_dir : python virtual environment home directory # eval_driver : luci_eval_driver path for evaluation -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier.py" BINDIR="$1"; shift WORKDIR="$1"; shift diff --git a/compiler/luci-value-test/evalverify_ref.sh b/compiler/luci-value-test/evalverify_ref.sh index f1e538aa31b..7f9d7beedc6 100755 --- a/compiler/luci-value-test/evalverify_ref.sh +++ b/compiler/luci-value-test/evalverify_ref.sh @@ -10,7 +10,7 @@ # ref_dir : artifacts directoy where reference test materials exist # eval_driver : luci_eval_driver path for evaluation -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier_ref.py" BINDIR="$1"; shift REFDIR="$1"; shift diff --git a/compiler/luci-value-test/evalverifytol.sh b/compiler/luci-value-test/evalverifytol.sh index 92094055aad..c4532e789aa 100755 --- a/compiler/luci-value-test/evalverifytol.sh +++ b/compiler/luci-value-test/evalverifytol.sh @@ -10,7 +10,7 @@ # work_dir : artifacts directoy where test materials exist # venv_dir : python virtual environment home directory -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier.py" BINDIR="$1"; shift WORKDIR="$1"; shift diff --git a/compiler/luci-value-test/evalverifytol_ref.sh b/compiler/luci-value-test/evalverifytol_ref.sh index cc7267b1833..7faedf36a9c 100755 --- a/compiler/luci-value-test/evalverifytol_ref.sh +++ b/compiler/luci-value-test/evalverifytol_ref.sh @@ -10,7 +10,7 @@ # ref_dir : artifacts directoy where reference test materials exist # eval_driver : luci_eval_driver path for evaluation -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier_ref.py" BINDIR="$1"; shift REFDIR="$1"; shift diff --git a/compiler/luci/tests/readverify.sh b/compiler/luci/tests/readverify.sh index 6d6753d39d4..6d2eef23fc1 100755 --- a/compiler/luci/tests/readverify.sh +++ b/compiler/luci/tests/readverify.sh @@ -5,7 +5,7 @@ # HOW TO USE # # ./readverify.sh ... -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" # set LOG enable to execute/test luci/logex codes export LUCI_LOG=100 diff --git a/compiler/luci/tests/writeverify.sh b/compiler/luci/tests/writeverify.sh index 6980bac4494..8c1fdf84b42 100755 --- a/compiler/luci/tests/writeverify.sh +++ b/compiler/luci/tests/writeverify.sh @@ -5,7 +5,7 @@ # HOW TO USE # # ./writeverify.sh ... -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" WORKDIR="$1"; shift VERIFY_BINARY_PATH="$1"; shift diff --git a/compiler/one-cmds/one-codegen b/compiler/one-cmds/one-codegen index 84e7b31d906..bc5c49167e0 100644 --- a/compiler/one-cmds/one-codegen +++ b/compiler/one-cmds/one-codegen @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # @@ -179,10 +179,10 @@ def main(): [5] one-codegen -b ${backend} ${command} [6] one-codegen -b ${backend} -- ${command} [7] one-codegen -b ${backend} -C {cfg} (backend, command key in cfg) - [8] one-codegen -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked, + [8] one-codegen -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked, even though cfg file has multiple backends) - [9] one-codegen -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg) - [10] one-codegen -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked, + [9] one-codegen -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg) + [10] one-codegen -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked, even though cfg file has multiple backends) [11] one-codegen -C {cfg} (w/ target, w/ command schema) [12] one-codegen -C {cfg} (w/ target, w/o command schema) diff --git a/compiler/one-cmds/one-create-quant-dataset b/compiler/one-cmds/one-create-quant-dataset index 8262b9efde6..9c1c1b16b51 100644 --- a/compiler/one-cmds/one-create-quant-dataset +++ b/compiler/one-cmds/one-create-quant-dataset @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import b/compiler/one-cmds/one-import index 880b8311d51..42417639ca4 100644 --- a/compiler/one-cmds/one-import +++ b/compiler/one-cmds/one-import @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import-bcq b/compiler/one-cmds/one-import-bcq index 66b63868188..ca937de65a8 100644 --- a/compiler/one-cmds/one-import-bcq +++ b/compiler/one-cmds/one-import-bcq @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import-onnx b/compiler/one-cmds/one-import-onnx index 35fcbeb56c4..f0efe8ebf1e 100644 --- a/compiler/one-cmds/one-import-onnx +++ b/compiler/one-cmds/one-import-onnx @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import-pytorch b/compiler/one-cmds/one-import-pytorch index 5fb856ced5d..76ad5823cc9 100644 --- a/compiler/one-cmds/one-import-pytorch +++ b/compiler/one-cmds/one-import-pytorch @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import-tf b/compiler/one-cmds/one-import-tf index bf5328879cf..b74574b04bb 100644 --- a/compiler/one-cmds/one-import-tf +++ b/compiler/one-cmds/one-import-tf @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-import-tflite b/compiler/one-cmds/one-import-tflite index edd24f44500..98472333280 100644 --- a/compiler/one-cmds/one-import-tflite +++ b/compiler/one-cmds/one-import-tflite @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-infer b/compiler/one-cmds/one-infer index 9c2dfddb2fb..6559b29d041 100644 --- a/compiler/one-cmds/one-infer +++ b/compiler/one-cmds/one-infer @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-init b/compiler/one-cmds/one-init index 2de1cde9220..aec9534a129 100644 --- a/compiler/one-cmds/one-init +++ b/compiler/one-cmds/one-init @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-optimize b/compiler/one-cmds/one-optimize index 7a7de8605ae..702fc87f64a 100644 --- a/compiler/one-cmds/one-optimize +++ b/compiler/one-cmds/one-optimize @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-pack b/compiler/one-cmds/one-pack index 5bddec99b69..f7f63939a9e 100644 --- a/compiler/one-cmds/one-pack +++ b/compiler/one-cmds/one-pack @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-partition b/compiler/one-cmds/one-partition index 728a5064b05..d1c40c7b0de 100644 --- a/compiler/one-cmds/one-partition +++ b/compiler/one-cmds/one-partition @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/one-prepare-venv b/compiler/one-cmds/one-prepare-venv index b7abf5d80bb..ae050c01d53 100644 --- a/compiler/one-cmds/one-prepare-venv +++ b/compiler/one-cmds/one-prepare-venv @@ -32,7 +32,7 @@ fi set -e -DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VENV_ACTIVATE=${DRIVER_PATH}/venv/bin/activate # NOTE please use venv's python instead of python after `source activation`. diff --git a/compiler/one-cmds/one-profile b/compiler/one-cmds/one-profile index 585517f7c4c..52dd63c9348 100644 --- a/compiler/one-cmds/one-profile +++ b/compiler/one-cmds/one-profile @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved # @@ -214,10 +214,10 @@ def main(): [5] one-profile -b ${backend} ${command} [6] one-profile -b ${backend} -- ${command} [7] one-profile -b ${backend} -C {cfg} (backend, command key in cfg) - [8] one-profile -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked, + [8] one-profile -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked, even though cfg file has multiple backends) - [9] one-profile -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg) - [10] one-profile -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked, + [9] one-profile -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg) + [10] one-profile -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked, even though cfg file has multiple backends) [11] one-profile -C {cfg} (w/ target, w/ command schema) [12] one-profile -C {cfg} (w/ target, w/o command schema) diff --git a/compiler/one-cmds/one-quantize b/compiler/one-cmds/one-quantize index ab77e7cd84f..b83ecd4224d 100644 --- a/compiler/one-cmds/one-quantize +++ b/compiler/one-cmds/one-quantize @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/one-cmds/onecc b/compiler/one-cmds/onecc index 6deaa444115..69cb2d12608 100644 --- a/compiler/one-cmds/onecc +++ b/compiler/one-cmds/onecc @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved # @@ -42,9 +42,9 @@ def run_subtools(): E.g. $ onecc -C ${CFG_FILE} $ onecc import tflite -i ${INPUT} -o ${OUTPUT} ## HERE - + Please refer to above `subtool_list` for the support list of sub-tools. - + This function checks if given sub-tool exists and run it directly. """ subtool_keys: List[str] = oneutils.one_cmd_list() diff --git a/compiler/one-cmds/tests/CMakeLists.txt b/compiler/one-cmds/tests/CMakeLists.txt index 05f8d017174..55f245f23b3 100644 --- a/compiler/one-cmds/tests/CMakeLists.txt +++ b/compiler/one-cmds/tests/CMakeLists.txt @@ -13,7 +13,7 @@ file(GLOB TARGETCONFITEMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "./*.ini") set(DRIVER_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/runtestall.sh") file(WRITE "${DRIVER_SCRIPT}" "#!/bin/bash\n\n") -file(APPEND "${DRIVER_SCRIPT}" "SCRIPT_PATH=$(cd $(dirname $\{BASH_SOURCE\[0\]\}) && pwd)\n") +file(APPEND "${DRIVER_SCRIPT}" "SCRIPT_PATH=$(cd $(dirname $\{BASH_SOURCE\[0\]\}) >/dev/null && pwd)\n") file(APPEND "${DRIVER_SCRIPT}" "pushd $SCRIPT_PATH > /dev/null\n") file(APPEND "${DRIVER_SCRIPT}" "rm -rf runtestall.log\n") file(APPEND "${DRIVER_SCRIPT}" "export PATH=$SCRIPT_PATH/../bin:$PATH\n") @@ -109,7 +109,7 @@ install(FILES ${PREPROCESS_IMAGES_NUMPY_PY} GROUP_READ WORLD_READ DESTINATION test) - + install(FILES ${ONNX_LEGALIZE_RUN_COMPARE} PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE diff --git a/compiler/one-cmds/tests/onnx-operations/CMakeLists.txt b/compiler/one-cmds/tests/onnx-operations/CMakeLists.txt index e6b2b354a05..d1faae52c78 100644 --- a/compiler/one-cmds/tests/onnx-operations/CMakeLists.txt +++ b/compiler/one-cmds/tests/onnx-operations/CMakeLists.txt @@ -39,7 +39,7 @@ endforeach(TEST_ITEM) set(DRIVER_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/runtestall.sh") file(WRITE "${DRIVER_SCRIPT}" "#!/bin/bash\n\n") -file(APPEND "${DRIVER_SCRIPT}" "SCRIPT_PATH=$(cd $(dirname \${BASH_SOURCE[0]}) && pwd)\n") +file(APPEND "${DRIVER_SCRIPT}" "SCRIPT_PATH=$(cd $(dirname \${BASH_SOURCE[0]}) >/dev/null && pwd)\n") file(APPEND "${DRIVER_SCRIPT}" "pushd $SCRIPT_PATH > /dev/null\n") file(APPEND "${DRIVER_SCRIPT}" "rm -rf runtestall.log\n") file(APPEND "${DRIVER_SCRIPT}" "export PATH=$SCRIPT_PATH/../bin:$PATH\n") diff --git a/compiler/one-cmds/tests/onnx-operations/prepare_test_materials.sh b/compiler/one-cmds/tests/onnx-operations/prepare_test_materials.sh index 274a60f0ae6..45ae3b5a02f 100644 --- a/compiler/one-cmds/tests/onnx-operations/prepare_test_materials.sh +++ b/compiler/one-cmds/tests/onnx-operations/prepare_test_materials.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" pushd $SCRIPT_PATH > /dev/null for test_case in examples/*; do diff --git a/compiler/one-cmds/tests/prepare_test_materials.sh b/compiler/one-cmds/tests/prepare_test_materials.sh index 6408d1b5103..c8ce3739796 100644 --- a/compiler/one-cmds/tests/prepare_test_materials.sh +++ b/compiler/one-cmds/tests/prepare_test_materials.sh @@ -16,7 +16,7 @@ # See https://github.com/Samsung/ONE/issues/4155 for information -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" pushd $SCRIPT_PATH > /dev/null if [[ ! -s "inception_v3.pb" ]]; then diff --git a/compiler/one-cmds/validate-onnx2circle/validate_onnx2circle.py b/compiler/one-cmds/validate-onnx2circle/validate_onnx2circle.py index 74778cf866f..9bf451b566d 100644 --- a/compiler/one-cmds/validate-onnx2circle/validate_onnx2circle.py +++ b/compiler/one-cmds/validate-onnx2circle/validate_onnx2circle.py @@ -1,5 +1,5 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" # ''' ''''export PY_PATH=${SCRIPT_PATH}/../bin/venv/bin/python # ''' ''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' ''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' diff --git a/compiler/onnx2tflite-integration-test/testall.sh b/compiler/onnx2tflite-integration-test/testall.sh index a1ab44405a2..8960d6820ac 100755 --- a/compiler/onnx2tflite-integration-test/testall.sh +++ b/compiler/onnx2tflite-integration-test/testall.sh @@ -1,6 +1,6 @@ #!/bin/bash -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) if [[ $# -lt 1 ]]; then echo "USAGE: $0 ..." diff --git a/compiler/pota-quantization-value-test/test_fake_wquant.sh b/compiler/pota-quantization-value-test/test_fake_wquant.sh index 607c3a6c886..db2c0718d1c 100755 --- a/compiler/pota-quantization-value-test/test_fake_wquant.sh +++ b/compiler/pota-quantization-value-test/test_fake_wquant.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE_QUANTIZER_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") @@ -28,7 +28,7 @@ FAILED=() TEST_PARAMS="$@" pushd "${WORKDIR}" -while [ "$1" != "" ]; do +while [ "$1" != "" ]; do MODELNAME=$1; shift GRANULARITY=$1; shift DTYPE=$1; shift @@ -50,7 +50,7 @@ while [ "$1" != "" ]; do "${CIRCLE_QUANTIZER_PATH}" \ --quantize_dequantize_weights float32 "${DTYPE}" "${GRANULARITY}" \ "${WORKDIR}/${MODELNAME}.circle" \ - "${TEST_RESULT_FILE}.fake_quantized.circle" + "${TEST_RESULT_FILE}.fake_quantized.circle" # Dump weights values (circle-tensordump) "${CIRCLE_TENSORDUMP_PATH}" \ diff --git a/compiler/pota-quantization-value-test/test_fake_wquant_with_config.sh b/compiler/pota-quantization-value-test/test_fake_wquant_with_config.sh index 815ab4ca7a5..287606a3c43 100755 --- a/compiler/pota-quantization-value-test/test_fake_wquant_with_config.sh +++ b/compiler/pota-quantization-value-test/test_fake_wquant_with_config.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE_QUANTIZER_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") @@ -27,7 +27,7 @@ FAILED=() TEST_PARAMS="$@" pushd "${WORKDIR}" -while [ "$1" != "" ]; do +while [ "$1" != "" ]; do MODELNAME=$1; shift GRANULARITY=$1; shift DTYPE=$1; shift @@ -50,7 +50,7 @@ while [ "$1" != "" ]; do --quantize_dequantize_weights float32 "${DTYPE}" "${GRANULARITY}" \ --config "${SOURCE_PATH}/config_files/${MODELNAME}/${GRANULARITY}/${DTYPE}/qconf.json" \ "${WORKDIR}/${MODELNAME}.circle" \ - "${TEST_RESULT_FILE}.fake_quantized.mixed.circle" + "${TEST_RESULT_FILE}.fake_quantized.mixed.circle" # Dump weights values (circle-tensordump) "${CIRCLE_TENSORDUMP_PATH}" \ diff --git a/compiler/pota-quantization-value-test/test_parallel_record_minmax.sh b/compiler/pota-quantization-value-test/test_parallel_record_minmax.sh index 612215dc29c..39f04fa8bb5 100755 --- a/compiler/pota-quantization-value-test/test_parallel_record_minmax.sh +++ b/compiler/pota-quantization-value-test/test_parallel_record_minmax.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE2CIRCLE_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") diff --git a/compiler/pota-quantization-value-test/test_quantization.sh b/compiler/pota-quantization-value-test/test_quantization.sh index 708bf292930..702994edd98 100755 --- a/compiler/pota-quantization-value-test/test_quantization.sh +++ b/compiler/pota-quantization-value-test/test_quantization.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE_QUANTIZER_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") @@ -28,7 +28,7 @@ FAILED=() TEST_PARAMS="$@" pushd "${WORKDIR}" -while [ "$1" != "" ]; do +while [ "$1" != "" ]; do MODELNAME=$1; shift GRANULARITY=$1; shift DTYPE=$1; shift @@ -50,7 +50,7 @@ while [ "$1" != "" ]; do "${CIRCLE_QUANTIZER_PATH}" \ --quantize_with_minmax float32 "${DTYPE}" "${GRANULARITY}" \ "${TEST_RESULT_FILE}.minmax_recorded.circle" \ - "${TEST_RESULT_FILE}.quantized.circle" + "${TEST_RESULT_FILE}.quantized.circle" # Dump scale, zp, weights values (circle-tensordump) "${CIRCLE_TENSORDUMP_PATH}" \ diff --git a/compiler/pota-quantization-value-test/test_quantization_with_config.sh b/compiler/pota-quantization-value-test/test_quantization_with_config.sh index e56f0fdc028..5ade8e73643 100755 --- a/compiler/pota-quantization-value-test/test_quantization_with_config.sh +++ b/compiler/pota-quantization-value-test/test_quantization_with_config.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE_QUANTIZER_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") @@ -44,7 +44,7 @@ if [[ $? -ne 0 ]]; then fi pushd "${WORKDIR}" -while [ "$1" != "" ]; do +while [ "$1" != "" ]; do MODELNAME=$1; shift GRANULARITY=$1; shift DTYPE=$1; shift @@ -68,14 +68,14 @@ while [ "$1" != "" ]; do "${RECORD_MINMAX_PATH}" \ --input_model "${TEST_RESULT_FILE}.fake_quantized.mixed.circle" \ --input_data "${TEST_RESULT_FILE}.mixed.input.h5" \ - --output_model "${TEST_RESULT_FILE}.minmax_recorded.mixed.circle" + --output_model "${TEST_RESULT_FILE}.minmax_recorded.mixed.circle" # Run circle-quantizer with --quantize_with_minmax "${CIRCLE_QUANTIZER_PATH}" \ --quantize_with_minmax float32 "${DTYPE}" "${GRANULARITY}" \ --config "${SOURCE_PATH}/config_files/${MODELNAME}/${GRANULARITY}/${DTYPE}/qconf.json" \ "${TEST_RESULT_FILE}.minmax_recorded.mixed.circle" \ - "${TEST_RESULT_FILE}.quantized.mixed.circle" + "${TEST_RESULT_FILE}.quantized.mixed.circle" # Dump scale, zp, weights values (circle-tensordump) "${CIRCLE_TENSORDUMP_PATH}" \ diff --git a/compiler/pota-quantization-value-test/test_record_minmax.sh b/compiler/pota-quantization-value-test/test_record_minmax.sh index f4609b3cf02..57d71a2d900 100755 --- a/compiler/pota-quantization-value-test/test_record_minmax.sh +++ b/compiler/pota-quantization-value-test/test_record_minmax.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} and ${CIRCLE2CIRCLE_PATH} # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") @@ -42,7 +42,7 @@ if [[ $? -ne 0 ]]; then fi pushd "${WORKDIR}" -while [ "$1" != "" ]; do +while [ "$1" != "" ]; do MODELNAME=$1; shift GRANULARITY=$1; shift DTYPE=$1; shift @@ -64,7 +64,7 @@ while [ "$1" != "" ]; do "${RECORD_MINMAX_PATH}" \ --input_model "${TEST_RESULT_FILE}.fake_quantized.circle" \ --input_data "${TEST_RESULT_FILE}.input.h5" \ - --output_model "${TEST_RESULT_FILE}.minmax_recorded.circle" + --output_model "${TEST_RESULT_FILE}.minmax_recorded.circle" # Dump min/max values (circle-tensordump) "${CIRCLE_TENSORDUMP_PATH}" \ diff --git a/compiler/pota-quantization-value-test/test_wo_quantization.sh b/compiler/pota-quantization-value-test/test_wo_quantization.sh index 2d5aa45a9ba..cacac6f7948 100755 --- a/compiler/pota-quantization-value-test/test_wo_quantization.sh +++ b/compiler/pota-quantization-value-test/test_wo_quantization.sh @@ -8,7 +8,7 @@ # test.config : set ${CIRCLE_QUANTIZER_PATH} and ${CIRCLE_TENSORDUMP_PATH}" # work_dir : build directory of quantization-value-test (ex: build/compiler/quantization-value-test) -SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" COMPARE_SCRIPT_PATH="${SOURCE_PATH}/compare_tensors_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "${CONFIG_PATH}") diff --git a/compiler/q-implant-qparam-test/q_implant_qparam_test.sh b/compiler/q-implant-qparam-test/q_implant_qparam_test.sh index fff4e60e318..f0374bdb8a8 100755 --- a/compiler/q-implant-qparam-test/q_implant_qparam_test.sh +++ b/compiler/q-implant-qparam-test/q_implant_qparam_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/q_implant_qparam_test.py" BINDIR="$1"; shift WORKDIR="$1"; shift diff --git a/compiler/rawdata2hdf5/rawdata2hdf5 b/compiler/rawdata2hdf5/rawdata2hdf5 index 292666ff123..34ccd4336d3 100644 --- a/compiler/rawdata2hdf5/rawdata2hdf5 +++ b/compiler/rawdata2hdf5/rawdata2hdf5 @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/compiler/record-minmax-conversion-test/testall.sh b/compiler/record-minmax-conversion-test/testall.sh index 71f186f018c..937332ee1d7 100755 --- a/compiler/record-minmax-conversion-test/testall.sh +++ b/compiler/record-minmax-conversion-test/testall.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} # work_dir : build directory of record-minmax-conversion-test (ex: build/compiler/record-minmax-conversion-test) -GEN_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +GEN_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" GEN_SCRIPT_PATH="${GEN_SOURCE_PATH}/gen_h5_random_inputs_all.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "$CONFIG_PATH") diff --git a/compiler/record-minmax-thread-safety-test/testall.sh b/compiler/record-minmax-thread-safety-test/testall.sh index 4b47b3ebbec..94ec3e62e4b 100755 --- a/compiler/record-minmax-thread-safety-test/testall.sh +++ b/compiler/record-minmax-thread-safety-test/testall.sh @@ -8,7 +8,7 @@ # test.config : set ${RECORD_MINMAX_PATH} # work_dir : build directory of record-minmax-thread-safety-test (ex: build/compiler/record-minmax-thread-safety-test) -GEN_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +GEN_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" GEN_SCRIPT_PATH="${GEN_SOURCE_PATH}/gen_h5_random_inputs.py" CONFIG_PATH="$1"; shift BIN_PATH=$(dirname "$CONFIG_PATH") diff --git a/compiler/tf2circle-dredd-pb-test/runner.sh b/compiler/tf2circle-dredd-pb-test/runner.sh index 7c7b123c4a2..4e17ee2530d 100755 --- a/compiler/tf2circle-dredd-pb-test/runner.sh +++ b/compiler/tf2circle-dredd-pb-test/runner.sh @@ -5,7 +5,7 @@ # exit if unknown var is used set -u -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tf2circle-dredd-pbtxt-test/runner.sh b/compiler/tf2circle-dredd-pbtxt-test/runner.sh index 7c7b123c4a2..4e17ee2530d 100755 --- a/compiler/tf2circle-dredd-pbtxt-test/runner.sh +++ b/compiler/tf2circle-dredd-pbtxt-test/runner.sh @@ -5,7 +5,7 @@ # exit if unknown var is used set -u -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tf2circle-model-test/runner.sh b/compiler/tf2circle-model-test/runner.sh index 9e3b75c263b..4a0f089e487 100755 --- a/compiler/tf2circle-model-test/runner.sh +++ b/compiler/tf2circle-model-test/runner.sh @@ -1,6 +1,6 @@ #!/bin/bash -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tf2nnpackage-value-remote-test/testall.sh b/compiler/tf2nnpackage-value-remote-test/testall.sh index ca672a3ebdb..b898ebb1769 100755 --- a/compiler/tf2nnpackage-value-remote-test/testall.sh +++ b/compiler/tf2nnpackage-value-remote-test/testall.sh @@ -20,7 +20,7 @@ WORKDIR="$1"; shift REMOTE_IP="$1"; shift REMOTE_USER="$1"; shift -BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" CURRENT_DATETIME=$(date +'%Y%m%d_%H%M%S') REMOTE_WORKDIR=${REMOTE_WORKDIR:-"CVT_${CURRENT_DATETIME}"} RESULT_CSV="${BINDIR}/Result_${CURRENT_DATETIME}.csv" diff --git a/compiler/tf2tflite-dredd-pb-test/runner.sh b/compiler/tf2tflite-dredd-pb-test/runner.sh index 4eef372b0d2..2628e6405d2 100755 --- a/compiler/tf2tflite-dredd-pb-test/runner.sh +++ b/compiler/tf2tflite-dredd-pb-test/runner.sh @@ -5,7 +5,7 @@ # exit if unknown var is used set -u -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tf2tflite-dredd-pbtxt-test/runner.sh b/compiler/tf2tflite-dredd-pbtxt-test/runner.sh index 8575bc282e7..67354ab786d 100755 --- a/compiler/tf2tflite-dredd-pbtxt-test/runner.sh +++ b/compiler/tf2tflite-dredd-pbtxt-test/runner.sh @@ -5,7 +5,7 @@ set -u # This script checks tflite file generated by tf2tflite -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tf2tflite-value-pb-test/runner.sh b/compiler/tf2tflite-value-pb-test/runner.sh index faec12521c1..aac3a202410 100755 --- a/compiler/tf2tflite-value-pb-test/runner.sh +++ b/compiler/tf2tflite-value-pb-test/runner.sh @@ -1,6 +1,6 @@ #!/bin/bash -WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +WORKDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd) # Need at least toolchain.config if [[ $# -lt 1 ]]; then diff --git a/compiler/tflite2circle-conversion-test/testall.sh b/compiler/tflite2circle-conversion-test/testall.sh index 2290ee6dbe4..11de2bf7413 100755 --- a/compiler/tflite2circle-conversion-test/testall.sh +++ b/compiler/tflite2circle-conversion-test/testall.sh @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then exit 255 fi -BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" CONFIG_PATH="$1"; shift WORKDIR="$1"; shift diff --git a/compiler/visq/visq b/compiler/visq/visq index 649c87ed18c..23378a84964 100644 --- a/compiler/visq/visq +++ b/compiler/visq/visq @@ -1,9 +1,9 @@ #!/usr/bin/env bash -''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # ''' -''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' -''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' -''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' -''''exit 255 # ''' +''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # ''' +''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # ''' +''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # ''' +''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # ''' +''''exit 255 # ''' # Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved # diff --git a/infra/packaging/build b/infra/packaging/build index e095f9df3c6..67b8d977311 100644 --- a/infra/packaging/build +++ b/infra/packaging/build @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" if [[ -z "${NNAS_PROJECT_PATH}" ]]; then echo "ERROR: NNAS_PROJECT_PATH is not specified" diff --git a/infra/packaging/res/tf2nnpkg b/infra/packaging/res/tf2nnpkg index c300eb85600..7708a1bfbc8 100644 --- a/infra/packaging/res/tf2nnpkg +++ b/infra/packaging/res/tf2nnpkg @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20191215 b/infra/packaging/res/tf2nnpkg.20191215 index d334a908df6..da5679d9fb1 100644 --- a/infra/packaging/res/tf2nnpkg.20191215 +++ b/infra/packaging/res/tf2nnpkg.20191215 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20200220 b/infra/packaging/res/tf2nnpkg.20200220 index 0875bad2fd2..7a6b645212e 100644 --- a/infra/packaging/res/tf2nnpkg.20200220 +++ b/infra/packaging/res/tf2nnpkg.20200220 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20200508 b/infra/packaging/res/tf2nnpkg.20200508 index a9923b4a4b1..029dead3a58 100644 --- a/infra/packaging/res/tf2nnpkg.20200508 +++ b/infra/packaging/res/tf2nnpkg.20200508 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20200616 b/infra/packaging/res/tf2nnpkg.20200616 index 9f0957115d0..729bdace426 100644 --- a/infra/packaging/res/tf2nnpkg.20200616 +++ b/infra/packaging/res/tf2nnpkg.20200616 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20200630 b/infra/packaging/res/tf2nnpkg.20200630 index b7091541a84..55c29c17a1c 100644 --- a/infra/packaging/res/tf2nnpkg.20200630 +++ b/infra/packaging/res/tf2nnpkg.20200630 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20210406 b/infra/packaging/res/tf2nnpkg.20210406 index 0d44818a116..2a9f58dcaee 100644 --- a/infra/packaging/res/tf2nnpkg.20210406 +++ b/infra/packaging/res/tf2nnpkg.20210406 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20210706 b/infra/packaging/res/tf2nnpkg.20210706 index 0d44818a116..2a9f58dcaee 100644 --- a/infra/packaging/res/tf2nnpkg.20210706 +++ b/infra/packaging/res/tf2nnpkg.20210706 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20210910 b/infra/packaging/res/tf2nnpkg.20210910 index 0d44818a116..2a9f58dcaee 100644 --- a/infra/packaging/res/tf2nnpkg.20210910 +++ b/infra/packaging/res/tf2nnpkg.20210910 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20220323 b/infra/packaging/res/tf2nnpkg.20220323 index 5f43b238673..062a8cad1a9 100644 --- a/infra/packaging/res/tf2nnpkg.20220323 +++ b/infra/packaging/res/tf2nnpkg.20220323 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20221125 b/infra/packaging/res/tf2nnpkg.20221125 index a7446e6fe4b..3bdb64d6aba 100644 --- a/infra/packaging/res/tf2nnpkg.20221125 +++ b/infra/packaging/res/tf2nnpkg.20221125 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20230413 b/infra/packaging/res/tf2nnpkg.20230413 index a7446e6fe4b..3bdb64d6aba 100644 --- a/infra/packaging/res/tf2nnpkg.20230413 +++ b/infra/packaging/res/tf2nnpkg.20230413 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/res/tf2nnpkg.20230907 b/infra/packaging/res/tf2nnpkg.20230907 index a7446e6fe4b..3bdb64d6aba 100644 --- a/infra/packaging/res/tf2nnpkg.20230907 +++ b/infra/packaging/res/tf2nnpkg.20230907 @@ -2,7 +2,7 @@ set -e -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null && pwd)" command_exists() { if [ "$#" -le 0 ]; then diff --git a/infra/packaging/verify b/infra/packaging/verify index 4d5e610af3b..95194022295 100644 --- a/infra/packaging/verify +++ b/infra/packaging/verify @@ -7,7 +7,7 @@ # # REQUIRE: N >= 1 # -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" if [[ -z "${NNAS_PROJECT_PATH}" ]]; then echo "ERROR: NNAS_PROJECT_PATH is not specified" diff --git a/infra/scripts/common.sh b/infra/scripts/common.sh index 0beaf6766b4..05e42becbb8 100755 --- a/infra/scripts/common.sh +++ b/infra/scripts/common.sh @@ -21,8 +21,8 @@ # NNPackageTest $1 $2 # Run [INSTALL_PATH]/test/onert-test nnpkg-test command -CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOT_PATH="$(cd ${CURRENT_PATH}/../../ && pwd)" +CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +ROOT_PATH="$(cd ${CURRENT_PATH}/../../ >/dev/null && pwd)" # Install path on CI INSTALL_PATH=$ROOT_PATH/Product/out diff --git a/infra/scripts/configure_collect_nnpkgs.sh b/infra/scripts/configure_collect_nnpkgs.sh index 9040112f42d..1fe30699feb 100755 --- a/infra/scripts/configure_collect_nnpkgs.sh +++ b/infra/scripts/configure_collect_nnpkgs.sh @@ -4,7 +4,7 @@ set -eo pipefail -CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" ROOT_PATH="$CURRENT_PATH/../../" source ${CURRENT_PATH}/compiler_modules.sh diff --git a/infra/scripts/configure_compiler_coverage.sh b/infra/scripts/configure_compiler_coverage.sh index e80c3e9c0e9..b3cecdc90d4 100755 --- a/infra/scripts/configure_compiler_coverage.sh +++ b/infra/scripts/configure_compiler_coverage.sh @@ -4,7 +4,7 @@ set -eo pipefail -CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" ROOT_PATH="$CURRENT_PATH/../../" source ${CURRENT_PATH}/compiler_modules.sh diff --git a/infra/scripts/tizen_xu4_test.sh b/infra/scripts/tizen_xu4_test.sh index 5610756b7c5..cb064084f8a 100755 --- a/infra/scripts/tizen_xu4_test.sh +++ b/infra/scripts/tizen_xu4_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" HOST_HOME=$SCRIPT_ROOT/../.. if [ -z "$TEST_ROOT" ]; then TEST_ROOT=/opt/usr/nnfw-test @@ -127,7 +127,7 @@ SDB_CMD="sdb -s $SERIAL " $SDB_CMD root on $SDB_CMD shell mount -o rw,remount / -SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" ROOT=$SCRIPT_ROOT/../ if [ -z "$RPM_DIR" ] && [ -z "$TEST_SUITE_PATH" ]; then diff --git a/infra/scripts/unittest_compiler_xml.sh b/infra/scripts/unittest_compiler_xml.sh index 6e9e8ad7f93..bae83eee149 100755 --- a/infra/scripts/unittest_compiler_xml.sh +++ b/infra/scripts/unittest_compiler_xml.sh @@ -4,7 +4,7 @@ set -eo pipefail -CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" ROOT_PATH="$CURRENT_PATH/../../" NNCC_WORKSPACE=${NNCC_WORKSPACE:-${ROOT_PATH}build} diff --git a/nnas b/nnas index 4445198fff0..7db2ae4436e 100755 --- a/nnas +++ b/nnas @@ -2,7 +2,7 @@ NNAS_CONFIG_RPATH="infra/config" NNAS_COMMAND_RPATH="infra/command" -NNAS_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +NNAS_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" function Usage() { diff --git a/nncc b/nncc index 23cfb5bd48c..0bd2a8df572 100755 --- a/nncc +++ b/nncc @@ -3,7 +3,7 @@ NNCC_SCRIPT_RPATH="scripts" NNCC_COMMAND_RPATH="infra/nncc/command" -NNCC_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +NNCC_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" NNCC_SCRIPT_PATH="${NNCC_PROJECT_PATH}/${NNCC_SCRIPT_RPATH}" function Usage() diff --git a/nnfw b/nnfw index 591fcd3a300..4b136edc4ae 100755 --- a/nnfw +++ b/nnfw @@ -3,7 +3,7 @@ NNFW_SCRIPT_RPATH="runtime/infra" NNFW_COMMAND_RPATH="${NNFW_SCRIPT_RPATH}/command" -NNFW_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +NNFW_PROJECT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" NNFW_SCRIPT_PATH="${NNFW_PROJECT_PATH}/${NNFW_SCRIPT_RPATH}" function Usage() diff --git a/res/TensorFlowTests/explain.sh b/res/TensorFlowTests/explain.sh index 9d6903327da..ce475ac55c3 100755 --- a/res/TensorFlowTests/explain.sh +++ b/res/TensorFlowTests/explain.sh @@ -1,6 +1,6 @@ #!/bin/bash -TESTCASE_REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TESTCASE_REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" ### Parse Command-line Arguments SHOW_PATH=0 diff --git a/runtime/contrib/android/gradlew b/runtime/contrib/android/gradlew index 79a61d421cc..6587e125b63 100755 --- a/runtime/contrib/android/gradlew +++ b/runtime/contrib/android/gradlew @@ -83,7 +83,7 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_HOME=$( cd "${APP_HOME:-./}" >/dev/null && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' diff --git a/runtime/tests/nnapi/specs/generate_test.sh b/runtime/tests/nnapi/specs/generate_test.sh index 08bae8454b9..1801bc3f8bb 100755 --- a/runtime/tests/nnapi/specs/generate_test.sh +++ b/runtime/tests/nnapi/specs/generate_test.sh @@ -36,7 +36,7 @@ Ex # generate_wrapper below for generating models and examples and updating the # test framework in one shot. -spec_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +spec_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd ) export NNAPI_BASE=$(readlink -f "$spec_dir/../../..") : ${TEST_DIR:=tests/nnapi} : ${FORCE:=""} @@ -171,4 +171,3 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then exit $? fi fi # [[ "${BASH_SOURCE[0]}" == "${0}" ]] - diff --git a/runtime/tests/scripts/benchmark.sh b/runtime/tests/scripts/benchmark.sh index 15fb64dedc7..1050c7253bd 100644 --- a/runtime/tests/scripts/benchmark.sh +++ b/runtime/tests/scripts/benchmark.sh @@ -26,7 +26,7 @@ # 4. Result trace.json # - trace.json is the result file -SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" ## If no optional argument is passed, set for android TEST_ROOT=/data/local/tmp/ diff --git a/runtime/tests/scripts/benchmark_nnpkg.sh b/runtime/tests/scripts/benchmark_nnpkg.sh index a180cd9b1c4..781c6747182 100755 --- a/runtime/tests/scripts/benchmark_nnpkg.sh +++ b/runtime/tests/scripts/benchmark_nnpkg.sh @@ -1,6 +1,6 @@ #!/bin/bash -MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" source $MY_PATH/common.sh diff --git a/runtime/tests/scripts/benchmark_ops.sh b/runtime/tests/scripts/benchmark_ops.sh index b1b3f69c26c..b8176723875 100755 --- a/runtime/tests/scripts/benchmark_ops.sh +++ b/runtime/tests/scripts/benchmark_ops.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" source $MY_PATH/common.sh diff --git a/runtime/tests/scripts/common.sh b/runtime/tests/scripts/common.sh index b0c44aef3b8..38d0d19e1e0 100755 --- a/runtime/tests/scripts/common.sh +++ b/runtime/tests/scripts/common.sh @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ROOT_PATH="$(cd ${MY_PATH}/../../ && pwd)" +MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +ROOT_PATH="$(cd ${MY_PATH}/../../ >/dev/null && pwd)" # Install path on CI INSTALL_PATH=$ROOT_PATH/Product/out diff --git a/runtime/tests/scripts/common_android.sh b/runtime/tests/scripts/common_android.sh index 66601aea313..73400b61bfa 100644 --- a/runtime/tests/scripts/common_android.sh +++ b/runtime/tests/scripts/common_android.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -MY_PATH="$( cd "$( dirname "$0" )" && pwd )" +MY_PATH="$( cd "$( dirname "$0" )" >/dev/null && pwd )" SHELL_CMD=/system/bin/sh diff --git a/runtime/tests/scripts/models/run_test.sh b/runtime/tests/scripts/models/run_test.sh index 52ac8cd1090..00a3a63dca2 100755 --- a/runtime/tests/scripts/models/run_test.sh +++ b/runtime/tests/scripts/models/run_test.sh @@ -15,7 +15,7 @@ # limitations under the License. -MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" NNFW_HOME="$(dirname $(dirname $(dirname ${MY_PATH})))" CACHE_ROOT_PATH=$MY_PATH/"cache" TEST_ROOT_PATH=$MY_PATH/"tflite" diff --git a/runtime/tests/scripts/models/run_test_android.sh b/runtime/tests/scripts/models/run_test_android.sh index 74b5cdd4687..5f2aee57e71 100644 --- a/runtime/tests/scripts/models/run_test_android.sh +++ b/runtime/tests/scripts/models/run_test_android.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -MY_PATH="$( cd "$( dirname "$0" )" && pwd )" +MY_PATH="$( cd "$( dirname "$0" )" >/dev/null && pwd )" NNFW_HOME="$(dirname $(dirname $(dirname ${MY_PATH})))" CACHE_ROOT_PATH=$MY_PATH/"cache" diff --git a/runtime/tests/scripts/onert-test b/runtime/tests/scripts/onert-test index f5ed4741958..90d7ccdf874 100644 --- a/runtime/tests/scripts/onert-test +++ b/runtime/tests/scripts/onert-test @@ -20,7 +20,7 @@ # DRIVER_PATH: test driver and related resources forder # INSTALL_PATH: test package installed folder # CACHE_PATH: cache folder for test resource download -DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" INSTALL_PATH="$(dirname $DRIVER_PATH)" CACHE_PATH=$DRIVER_PATH/cache diff --git a/runtime/tests/scripts/test_scheduler_with_profiling.sh b/runtime/tests/scripts/test_scheduler_with_profiling.sh index 287f6b942f4..f96927909c2 100755 --- a/runtime/tests/scripts/test_scheduler_with_profiling.sh +++ b/runtime/tests/scripts/test_scheduler_with_profiling.sh @@ -2,7 +2,7 @@ set -eo pipefail -MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" source $MY_PATH/common.sh BACKEND_CNT=3 diff --git a/runtime/tests/scripts/test_scheduler_with_profiling_android.sh b/runtime/tests/scripts/test_scheduler_with_profiling_android.sh index 62557e21d89..f08d3974ef8 100644 --- a/runtime/tests/scripts/test_scheduler_with_profiling_android.sh +++ b/runtime/tests/scripts/test_scheduler_with_profiling_android.sh @@ -40,7 +40,7 @@ # sh /data/local/tmp/tests/scripts/test_scheduler_with_profiling_android.sh # -MY_PATH="$( cd "$( dirname "$0" )" && pwd )" +MY_PATH="$( cd "$( dirname "$0" )" >/dev/null && pwd )" SHELL_CMD=/system/bin/sh @@ -50,7 +50,7 @@ BACKEND_CNT=3 # Run profiler BACKEND_CNT+1 times: on each run of the first BACKEND_CNT runs it will # collect metrics for one unmeasured backend. On the last run metrics for data transfer PROFILING_RUN_CNT=$((BACKEND_CNT+1)) -TEST_DRIVER_DIR="$( cd "$( dirname "$0" )" && pwd )" +TEST_DRIVER_DIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" ARTIFACT_PATH="$TEST_DRIVER_DIR/../.." BENCHMARK_DRIVER_BIN=$ARTIFACT_PATH/Product/out/bin/tflite_run diff --git a/tools/cross/install_android_sdk.sh b/tools/cross/install_android_sdk.sh index 9b780a5089a..04924b55678 100755 --- a/tools/cross/install_android_sdk.sh +++ b/tools/cross/install_android_sdk.sh @@ -15,7 +15,7 @@ # limitations under the License. # Setup Android Cross-Build Environment (ANDROID SDK) -SCRIPT_HOME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # absolute path to directory where script is +SCRIPT_HOME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd ) # absolute path to directory where script is INSTALL_PATH=$SCRIPT_HOME/android_sdk # path to directory where android sdk will be installed PLATFORMS_PACKAGE_VERSION="29" # version of platfroms package which will be installed BUILD_TOOLS_PACKAGE_VERSION="29.0.3" # version of build-tools package which will be installed diff --git a/tools/cross/install_rootfs.sh b/tools/cross/install_rootfs.sh index 8ed2c145c19..1b121b44c4f 100755 --- a/tools/cross/install_rootfs.sh +++ b/tools/cross/install_rootfs.sh @@ -14,7 +14,7 @@ usage() exit 1 } -__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd ) __InitialDir=$PWD __UbuntuRepo="http://ports.ubuntu.com/" diff --git a/tools/extract_weights_from_tflite/extract_from_tflite.sh b/tools/extract_weights_from_tflite/extract_from_tflite.sh index 7bc870bec4a..ed5bc17f759 100755 --- a/tools/extract_weights_from_tflite/extract_from_tflite.sh +++ b/tools/extract_weights_from_tflite/extract_from_tflite.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" ROOT_PATH=$SCRIPT_PATH/../.. FLATC=$ROOT_PATH/Product/out/bin/flatc diff --git a/tools/nnpackage_tool/nncc-tc-to-nnpkg-tc/nncc-tc-to-nnpkg-tc.sh b/tools/nnpackage_tool/nncc-tc-to-nnpkg-tc/nncc-tc-to-nnpkg-tc.sh index 4edb4ceaeef..249d65c347d 100755 --- a/tools/nnpackage_tool/nncc-tc-to-nnpkg-tc/nncc-tc-to-nnpkg-tc.sh +++ b/tools/nnpackage_tool/nncc-tc-to-nnpkg-tc/nncc-tc-to-nnpkg-tc.sh @@ -3,7 +3,7 @@ set -eu progname=$(basename "${BASH_SOURCE[0]}") -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" model2nnpkg=${model2nnpkg:-"$script_dir"/../model2nnpkg/model2nnpkg.py} # Need to install nncc package & set path to tf2nnpkg tf2nnpkg=$(which tf2nnpkg) @@ -91,4 +91,3 @@ mkdir -p "$destdir" for ext in $extensions; do cp "$indir/$tcname.$ext" "$destdir/$ext" done; - diff --git a/tools/nnpackage_tool/sth2nnpkgtc/pb2nnpkgtc.sh b/tools/nnpackage_tool/sth2nnpkgtc/pb2nnpkgtc.sh index bc7b0b974e0..a765aeae28e 100755 --- a/tools/nnpackage_tool/sth2nnpkgtc/pb2nnpkgtc.sh +++ b/tools/nnpackage_tool/sth2nnpkgtc/pb2nnpkgtc.sh @@ -3,8 +3,8 @@ set -u progname=$(basename "${BASH_SOURCE[0]}") -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -nnfw_root="$( cd "${script_dir%*/*/*/*}" && pwd )" +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +nnfw_root="$( cd "${script_dir%*/*/*/*}" >/dev/null && pwd )" outdir="." # set path to tools and resources diff --git a/tools/nnpackage_tool/sth2nnpkgtc/tflite2nnpkgtc.sh b/tools/nnpackage_tool/sth2nnpkgtc/tflite2nnpkgtc.sh index 1f0569b7406..6953ae04904 100755 --- a/tools/nnpackage_tool/sth2nnpkgtc/tflite2nnpkgtc.sh +++ b/tools/nnpackage_tool/sth2nnpkgtc/tflite2nnpkgtc.sh @@ -3,8 +3,8 @@ set -u progname=$(basename "${BASH_SOURCE[0]}") -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -nnfw_root="$( cd "${script_dir%*/*/*/*}" && pwd )" +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +nnfw_root="$( cd "${script_dir%*/*/*/*}" >/dev/null && pwd )" outdir="." usage() { diff --git a/tools/release_tool/onert_version.sh b/tools/release_tool/onert_version.sh index 7b167439b0e..3f727a67b0f 100755 --- a/tools/release_tool/onert_version.sh +++ b/tools/release_tool/onert_version.sh @@ -3,8 +3,8 @@ set -eu progname=$(basename "${BASH_SOURCE[0]}") -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -nnfw_root="$( cd "${script_dir%*/*/*}" && pwd )" +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +nnfw_root="$( cd "${script_dir%*/*/*}" >/dev/null && pwd )" nightly=1 usage() { diff --git a/tools/tflkit/freeze_graph.sh b/tools/tflkit/freeze_graph.sh index ae771cf80a9..c30832548c3 100755 --- a/tools/tflkit/freeze_graph.sh +++ b/tools/tflkit/freeze_graph.sh @@ -7,7 +7,7 @@ usage() echo " [--tensorflow_path=TensorFlow path] (If omitted, the module installed in system will be used by default.)" } -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" for i in "$@" do diff --git a/tools/tflkit/optimize_for_inference.sh b/tools/tflkit/optimize_for_inference.sh index ef6e5291205..c8b1bfa77a3 100755 --- a/tools/tflkit/optimize_for_inference.sh +++ b/tools/tflkit/optimize_for_inference.sh @@ -7,7 +7,7 @@ usage() echo " --tensorflow_path=TensorFlow path (Use externals/tensorflow by default)" } -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" TF_DIR="${SCRIPT_PATH}/../../externals/tensorflow" diff --git a/tools/tflkit/summarize_tflite.sh b/tools/tflkit/summarize_tflite.sh index e15550b0744..7f01a72d4f8 100755 --- a/tools/tflkit/summarize_tflite.sh +++ b/tools/tflkit/summarize_tflite.sh @@ -1,4 +1,4 @@ #!/bin/bash -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" python "${SCRIPT_PATH}/../tflitefile_tool/model_parser.py" ${@} diff --git a/tools/tflkit/tflite_convert.sh b/tools/tflkit/tflite_convert.sh index f5b94ede0b5..2b9804510e8 100755 --- a/tools/tflkit/tflite_convert.sh +++ b/tools/tflkit/tflite_convert.sh @@ -7,7 +7,7 @@ usage() echo " [ --tensorflow_path= --tensorflow_version= ] (If omitted, the module installed in system will be used by default.)" } -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" for i in "$@" do diff --git a/tools/tflkit/transform_graph.sh b/tools/tflkit/transform_graph.sh index 828a36300cf..8305b0a6418 100755 --- a/tools/tflkit/transform_graph.sh +++ b/tools/tflkit/transform_graph.sh @@ -7,7 +7,7 @@ usage() echo " --tensorflow_path=TensorFlow path (Use externals/tensorflow by default)" } -SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" TF_DIR="${SCRIPT_PATH}/../../externals/tensorflow"