File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
torchci/lib/benchmark/llms/utils Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,31 @@ export function getLLMsBenchmarkPropsQueryParameter(props: LLMsBenchmarkProps) {
58
58
dtypes = [ props . dtypeName ] ;
59
59
}
60
60
61
+ const deviceName =
62
+ props . deviceName === DEFAULT_DEVICE_NAME ? "" : props . deviceName ;
63
+ const archName = props . archName === DEFAULT_ARCH_NAME ? "" : props . archName ;
64
+
65
+ let device = "" ;
66
+ let arch = "" ;
67
+ if ( archName === "" ) {
68
+ // All the dashboards currently put device and arch into the same field in
69
+ // device (arch) format, i.e. cuda (NVIDIA B200). So, we need to extract
70
+ // the arch name here to use it in the query
71
+ const deviceArchRegex = new RegExp ( "^(?<device>.+)\\s+\\((?<arch>.+)\\)$" ) ;
72
+ const m = deviceName . match ( deviceArchRegex ) ;
73
+
74
+ device =
75
+ m !== null && m . groups !== undefined ? m . groups . device : deviceName ;
76
+ arch = m !== null && m . groups !== undefined ? m . groups . arch : archName ;
77
+ } else {
78
+ // If both device and arch are set, we just need to use them as they are
79
+ device = deviceName ;
80
+ arch = archName ;
81
+ }
82
+
61
83
const queryParams = {
62
- arch : props . archName === DEFAULT_ARCH_NAME ? "" : props . archName ,
63
- device : props . deviceName === DEFAULT_DEVICE_NAME ? "" : props . deviceName ,
84
+ arch : arch ,
85
+ device : device ,
64
86
mode : props . modeName === DEFAULT_MODE_NAME ? "" : props . modeName ,
65
87
dtypes : dtypes ,
66
88
excludedMetrics : EXCLUDED_METRICS ,
You can’t perform that action at this time.
0 commit comments