Skip to content

Select the correct device (arch) on benchmark dashboard(s) #6993

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

Merged
merged 3 commits into from
Aug 12, 2025
Merged
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
26 changes: 24 additions & 2 deletions torchci/lib/benchmark/llms/utils/llmUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,31 @@ 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 === "") {
// 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
// the arch name here to use it in the query
const deviceArchRegex = new RegExp("^(?<device>.+)\\s+\\((?<arch>.+)\\)$");
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 {
// If both device and arch are set, we just need to use them as they are
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,
Expand Down