From ef451b285423db8558cc3953715868bfae6cfd13 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 11 Aug 2025 19:01:20 -0700 Subject: [PATCH 1/3] Select the correct device (arch) on benchmark dashboard(s) Signed-off-by: Huy Do --- torchci/lib/benchmark/llms/utils/llmUtils.ts | 27 ++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/torchci/lib/benchmark/llms/utils/llmUtils.ts b/torchci/lib/benchmark/llms/utils/llmUtils.ts index 510a81f797..f1ab791203 100644 --- a/torchci/lib/benchmark/llms/utils/llmUtils.ts +++ b/torchci/lib/benchmark/llms/utils/llmUtils.ts @@ -58,9 +58,32 @@ export function getLLMsBenchmarkPropsQueryParameter(props: LLMsBenchmarkProps) { dtypes = [props.dtypeName]; } + const deviceName = + props.deviceName === DEFAULT_DEVICE_NAME ? "" : props.deviceName; + const archName = props.archName === DEFAULT_ARCH_NAME ? "" : props.archName; + + let device = ""; + let arch = ""; + if (archName === "") { + console.log("HERE"); + // All the dashboards currently put device and arch into the same field in + // device (arch) format, i.e. cuda (NVIDIA B200). So, we need to extract + //extract the arch name here to use it in the query + const deviceArchRegex = new RegExp("^(?.+)\\s+\\((?.+)\\)$"); + const m = deviceName.match(deviceArchRegex); + + device = + m !== null && m.groups !== undefined ? m.groups.device : deviceName; + arch = m !== null && m.groups !== undefined ? m.groups.arch : archName; + } else { + console.log("THERE"); + device = deviceName; + arch = archName; + } + const queryParams = { - arch: props.archName === DEFAULT_ARCH_NAME ? "" : props.archName, - device: props.deviceName === DEFAULT_DEVICE_NAME ? "" : props.deviceName, + arch: arch, + device: device, mode: props.modeName === DEFAULT_MODE_NAME ? "" : props.modeName, dtypes: dtypes, excludedMetrics: EXCLUDED_METRICS, From d49bb2a78ddc60b29f72cbf988af5a0226bfbb4b Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 11 Aug 2025 19:02:48 -0700 Subject: [PATCH 2/3] Clean up debug Signed-off-by: Huy Do --- torchci/lib/benchmark/llms/utils/llmUtils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torchci/lib/benchmark/llms/utils/llmUtils.ts b/torchci/lib/benchmark/llms/utils/llmUtils.ts index f1ab791203..7a037209e4 100644 --- a/torchci/lib/benchmark/llms/utils/llmUtils.ts +++ b/torchci/lib/benchmark/llms/utils/llmUtils.ts @@ -65,7 +65,6 @@ export function getLLMsBenchmarkPropsQueryParameter(props: LLMsBenchmarkProps) { let device = ""; let arch = ""; if (archName === "") { - console.log("HERE"); // All the dashboards currently put device and arch into the same field in // device (arch) format, i.e. cuda (NVIDIA B200). So, we need to extract //extract the arch name here to use it in the query @@ -76,7 +75,7 @@ export function getLLMsBenchmarkPropsQueryParameter(props: LLMsBenchmarkProps) { m !== null && m.groups !== undefined ? m.groups.device : deviceName; arch = m !== null && m.groups !== undefined ? m.groups.arch : archName; } else { - console.log("THERE"); + // If both device and arch are set, we just need to use them as they are device = deviceName; arch = archName; } From d7c248e73071cd7c8374fd97dc92827409bdd5df Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 11 Aug 2025 19:07:16 -0700 Subject: [PATCH 3/3] Typo Signed-off-by: Huy Do --- torchci/lib/benchmark/llms/utils/llmUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchci/lib/benchmark/llms/utils/llmUtils.ts b/torchci/lib/benchmark/llms/utils/llmUtils.ts index 7a037209e4..0c50173b11 100644 --- a/torchci/lib/benchmark/llms/utils/llmUtils.ts +++ b/torchci/lib/benchmark/llms/utils/llmUtils.ts @@ -67,7 +67,7 @@ export function getLLMsBenchmarkPropsQueryParameter(props: LLMsBenchmarkProps) { if (archName === "") { // All the dashboards currently put device and arch into the same field in // device (arch) format, i.e. cuda (NVIDIA B200). So, we need to extract - //extract the arch name here to use it in the query + // the arch name here to use it in the query const deviceArchRegex = new RegExp("^(?.+)\\s+\\((?.+)\\)$"); const m = deviceName.match(deviceArchRegex);