From e7188d1dfd2a4b4dbf40d67b64204019ebfddfb2 Mon Sep 17 00:00:00 2001 From: bapijun Date: Mon, 25 Sep 2023 16:21:26 +0800 Subject: [PATCH 1/2] fix the problem when test op benchmark using the other ampere or Ada gpu, can't use nsight system --- api/common/launch.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/common/launch.py b/api/common/launch.py index 69e29dd2ab..ca0008e7c5 100644 --- a/api/common/launch.py +++ b/api/common/launch.py @@ -26,10 +26,15 @@ def is_ampere_gpu(): stdout, exit_code = system.run_command("nvidia-smi -L") if exit_code == 0: gpu_list = stdout.split("\n") + # have nvidia gpu if len(gpu_list) >= 1: - #print(gpu_list[0]) - # GPU 0: NVIDIA A100-SXM4-40GB (UUID: xxxx) - return gpu_list[0].find("A100") > 0 + stdout, exit_code = system.run_command("nvidia-smi --query-gpu=compute_cap --format=csv -i=0") + if exit_code == 0: + compute_cap_list = stdout.split("\n") + compute_cap = float(compute_cap_list[1]) + #Capability for ampere is 8.x, Ada lovelace is 8.9, H100 is 9.0 + if compute_cap>8: + return True return False From 2b145746289a009dd6d546ea1f429ba77427036d Mon Sep 17 00:00:00 2001 From: bapijun Date: Mon, 25 Sep 2023 16:28:24 +0800 Subject: [PATCH 2/2] add a tab --- api/common/launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/common/launch.py b/api/common/launch.py index ca0008e7c5..7e5f531cfc 100644 --- a/api/common/launch.py +++ b/api/common/launch.py @@ -34,7 +34,7 @@ def is_ampere_gpu(): compute_cap = float(compute_cap_list[1]) #Capability for ampere is 8.x, Ada lovelace is 8.9, H100 is 9.0 if compute_cap>8: - return True + return True return False