Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-test] Fix GPU memory usage detection #2576

Merged
merged 6 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/userbenchmark-a100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
- name: Install Conda
run: |
bash ./.ci/torchbench/install-conda.sh
- name: Install TorchBench
run: |
bash ./.ci/torchbench/install.sh
# - name: Install TorchBench
# run: |
# bash ./.ci/torchbench/install.sh
- name: Run user benchmark
run: |
set -x
Expand Down
6 changes: 3 additions & 3 deletions userbenchmark/release-test/monitor_proc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ get_gpu_max_memory_usage_cuda() {
local my_pid=$1
local max=$2
local curr
# Some processes might not use the GPU
if ! nvidia-smi pmon -s m -c 1 -o T | grep "${my_pid}" >/dev/null 2>/dev/null; then
curr=$(nvidia-smi dmon -s m -c 1 -o T -i 0 | tail -n +3 | awk '{print $3}' | sort -n | tail -1 | grep -o "[0-9.]*")
# Some processes might not use the GPU, then memory usage should be 0
if [ "${curr}" -eq 0 ] ; then
echo "${max}"
return
fi
curr=$(nvidia-smi pmon -s m -c 1 -o T | grep "${my_pid}" | awk '{print $5}' | sort | tail -1 | grep -o "[0-9.]*")
max "${curr}" "${max}"
}

Expand Down
Loading