From 6ec17e3b06d346bd4a0868afc17fdc347f183a61 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 27 Aug 2024 16:26:12 -0400 Subject: [PATCH] shellcheck: Remove unnecessary echo usage This simplifies some code in response to this message from shellcheck: SC2005 (style): Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. Signed-off-by: Russell Bryant --- .buildkite/nightly-benchmarks/run-nightly-suite.sh | 2 +- .buildkite/nightly-benchmarks/scripts/run-lmdeploy-nightly.sh | 2 +- .../nightly-benchmarks/scripts/run-performance-benchmarks.sh | 2 +- .buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh | 2 +- .buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh | 2 +- .buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh | 2 +- .buildkite/run-neuron-test.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.buildkite/nightly-benchmarks/run-nightly-suite.sh b/.buildkite/nightly-benchmarks/run-nightly-suite.sh index bd7f4ddb2021c..f1bfbfac8a517 100644 --- a/.buildkite/nightly-benchmarks/run-nightly-suite.sh +++ b/.buildkite/nightly-benchmarks/run-nightly-suite.sh @@ -12,7 +12,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/nightly-benchmarks/scripts/run-lmdeploy-nightly.sh b/.buildkite/nightly-benchmarks/scripts/run-lmdeploy-nightly.sh index 5883d3169ef0c..a1d1288c6e2d2 100644 --- a/.buildkite/nightly-benchmarks/scripts/run-lmdeploy-nightly.sh +++ b/.buildkite/nightly-benchmarks/scripts/run-lmdeploy-nightly.sh @@ -11,7 +11,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - declare -g gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + declare -g gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/nightly-benchmarks/scripts/run-performance-benchmarks.sh b/.buildkite/nightly-benchmarks/scripts/run-performance-benchmarks.sh index 9f9bf1c10e43a..1685aef4f2044 100644 --- a/.buildkite/nightly-benchmarks/scripts/run-performance-benchmarks.sh +++ b/.buildkite/nightly-benchmarks/scripts/run-performance-benchmarks.sh @@ -17,7 +17,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - declare -g gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + declare -g gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh b/.buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh index a81ee45319254..5a5ecff236ccf 100644 --- a/.buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh +++ b/.buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh @@ -11,7 +11,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - declare -g gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + declare -g gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh b/.buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh index 9fb7f83ba7b31..3a2cb3a1c54bc 100644 --- a/.buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh +++ b/.buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh @@ -11,7 +11,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - declare -g gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + declare -g gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh b/.buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh index 81e3f5f50cf17..8c8d3cd666029 100644 --- a/.buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh +++ b/.buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh @@ -11,7 +11,7 @@ check_gpus() { echo "Need at least 1 GPU to run benchmarking." exit 1 fi - declare -g gpu_type=$(echo "$(nvidia-smi --query-gpu=name --format=csv,noheader)" | awk '{print $2}') + declare -g gpu_type=$(nvidia-smi --query-gpu=name --format=csv,noheader | awk '{print $2}') echo "GPU type is $gpu_type" } diff --git a/.buildkite/run-neuron-test.sh b/.buildkite/run-neuron-test.sh index dfbcbdf14f9fc..9259391aaed49 100644 --- a/.buildkite/run-neuron-test.sh +++ b/.buildkite/run-neuron-test.sh @@ -17,7 +17,7 @@ if [ -f /tmp/neuron-docker-build-timestamp ]; then echo "$current_time" > /tmp/neuron-docker-build-timestamp fi else - echo "$(date +%s)" > /tmp/neuron-docker-build-timestamp + date "+%s" > /tmp/neuron-docker-build-timestamp fi docker build -t neuron -f Dockerfile.neuron .