Skip to content

Commit

Permalink
shellcheck: Remove unnecessary echo usage
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
russellb committed Aug 27, 2024
1 parent ad34302 commit 6ec17e3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .buildkite/nightly-benchmarks/run-nightly-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/nightly-benchmarks/scripts/run-tgi-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/nightly-benchmarks/scripts/run-trt-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/nightly-benchmarks/scripts/run-vllm-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-neuron-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 6ec17e3

Please sign in to comment.