Skip to content

Commit 4709168

Browse files
authored
[BUG FIX] Fix query bug for device and arch (#7479)
Make the query in sync with the materialize logics for device and arch for list metadata The old one fetch cuda for rocm
1 parent 78b7803 commit 4709168

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

torchci/lib/benchmark/api_helper/backend/dataFetchers/queryBuilderUtils/benchmarkDataQueryBuilder.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,23 @@ export class BenchmarkDataQuery extends ExecutableQueryBase {
125125
floor(toFloat64(o.metric.'target_value'), 2) AS target,
126126
o.benchmark.'mode' AS mode,
127127
o.benchmark.'dtype' AS dtype,
128-
multiIf(
129-
NOT empty(tupleElement(o.benchmark, 'extra_info')['device']),
130-
tupleElement(o.benchmark, 'extra_info')['device'],
131-
132-
NOT empty(tupleElement(o.runners[1], 'name')),
133-
tupleElement(o.runners[1], 'name'),
134-
135-
'cpu' -- final fallback
128+
if(
129+
empty(tupleElement(runners[1], 'name')),
130+
if(
131+
empty(tupleElement(benchmark, 'extra_info')['device']),
132+
'cpu',
133+
tupleElement(benchmark, 'extra_info')['device']
134+
),
135+
tupleElement(runners[1], 'name')
136136
) AS device,
137-
multiIf(
138-
NOT empty(tupleElement(o.benchmark, 'extra_info')['arch']),
139-
tupleElement(o.benchmark, 'extra_info')['arch'],
140-
141-
NOT empty(tupleElement(o.runners[1], 'type')),
142-
tupleElement(o.runners[1], 'type'),
143-
144-
tupleElement(o.runners[1], 'cpu_info') -- final fallback
137+
if(
138+
empty(tupleElement(runners[1], 'type')),
139+
if(
140+
empty(tupleElement(benchmark, 'extra_info')['arch']),
141+
tupleElement(runners[1], 'cpu_info'),
142+
tupleElement(benchmark, 'extra_info')['arch']
143+
),
144+
tupleElement(runners[1], 'type')
145145
) AS arch,
146146
DATE_TRUNC(
147147
{granularity: String },

0 commit comments

Comments
 (0)