Skip to content

Commit f48f29c

Browse files
authored
revert cross-device comparison (#6344)
1 parent d46a3ff commit f48f29c

File tree

7 files changed

+84
-254
lines changed

7 files changed

+84
-254
lines changed

torchci/components/benchmark/compilers/CompilerGraphGroup.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@ export default function CompilerGraphGroup({
1616
suiteConfig,
1717
queryParams,
1818
granularity,
19-
lDeviceName,
2019
lBranchAndCommit,
21-
rDeviceName,
2220
rBranchAndCommit,
2321
}: {
2422
dashboard: string;
2523
suiteConfig: SuiteConfig;
2624
queryParams: { [key: string]: any };
2725
granularity: Granularity;
28-
lDeviceName: string;
2926
lBranchAndCommit: BranchAndCommit;
30-
rDeviceName: string;
3127
rBranchAndCommit: BranchAndCommit;
3228
}) {
3329
// TODO (huydhn): Remove this once TorchInductor dashboard is migrated to the
@@ -48,7 +44,6 @@ export default function CompilerGraphGroup({
4844
granularity={granularity}
4945
suite={suiteConfig.id}
5046
branch={lBranchAndCommit.branch}
51-
deviceName={lDeviceName}
5247
lCommit={lBranchAndCommit.commit}
5348
rCommit={rBranchAndCommit.commit}
5449
/>

torchci/components/benchmark/compilers/ModelPanel.tsx

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ export function ModelPanel({
3939
suite,
4040
mode,
4141
dtype,
42+
deviceName,
4243
compiler,
4344
model,
44-
lDeviceName,
4545
lPerfData,
46-
rDeviceName,
4746
rPerfData,
4847
}: {
4948
dashboard: string;
@@ -53,11 +52,10 @@ export function ModelPanel({
5352
suite: string;
5453
mode: string;
5554
dtype: string;
55+
deviceName: string;
5656
compiler: string;
5757
model: string;
58-
lDeviceName: string;
5958
lPerfData: BranchAndCommitPerfData;
60-
rDeviceName: string;
6159
rPerfData: BranchAndCommitPerfData;
6260
}) {
6361
const lBranch = lPerfData.branch;
@@ -75,10 +73,7 @@ export function ModelPanel({
7573
});
7674

7775
// Combine with right data
78-
if (
79-
(lDeviceName !== rDeviceName || lCommit !== rCommit) &&
80-
rData !== undefined
81-
) {
76+
if (lCommit !== rCommit && rData !== undefined) {
8277
rData.forEach((record: CompilerPerformanceData) => {
8378
if (record.name in dataGroupedByModel) {
8479
dataGroupedByModel[record.name]["r"] = record;
@@ -186,10 +181,8 @@ export function ModelPanel({
186181
: undefined;
187182

188183
const encodedName = encodeURIComponent(name);
189-
const url = `/benchmark/${suite}/${compiler}?dashboard=${dashboard}&startTime=${startTime}&stopTime=${stopTime}&granularity=${granularity}&mode=${mode}&model=${encodedName}&dtype=${dtype}&lDeviceName=${encodeURIComponent(
190-
lDeviceName
191-
)}&rDeviceName=${encodeURIComponent(
192-
rDeviceName
184+
const url = `/benchmark/${suite}/${compiler}?dashboard=${dashboard}&startTime=${startTime}&stopTime=${stopTime}&granularity=${granularity}&mode=${mode}&model=${encodedName}&dtype=${dtype}&deviceName=${encodeURIComponent(
185+
deviceName
193186
)}&lBranch=${lBranch}&lCommit=${lCommit}&rBranch=${rBranch}&rCommit=${rCommit}`;
194187

195188
if (lLog === undefined) {
@@ -244,7 +237,7 @@ export function ModelPanel({
244237
return "";
245238
}
246239

247-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
240+
if (lCommit === rCommit) {
248241
return PASSING_ACCURACY.includes(v.l) ? "" : styles.warning;
249242
} else {
250243
if (
@@ -280,10 +273,7 @@ export function ModelPanel({
280273
{v.l} (<strong>NEW!</strong>)
281274
</>
282275
);
283-
} else if (
284-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
285-
v.l === v.r
286-
) {
276+
} else if (lCommit === rCommit || v.l === v.r) {
287277
return v.l;
288278
} else {
289279
return `${v.r}${v.l}`;
@@ -303,7 +293,7 @@ export function ModelPanel({
303293
const l = Number(v.l);
304294
const r = Number(v.r);
305295

306-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
296+
if (lCommit === rCommit) {
307297
return l >= SPEEDUP_THRESHOLD ? "" : styles.warning;
308298
} else {
309299
// l is the new value, r is the old value
@@ -340,11 +330,7 @@ export function ModelPanel({
340330
const l = Number(v.l).toFixed(SCALE);
341331
const r = Number(v.r).toFixed(SCALE);
342332

343-
if (
344-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
345-
l === r ||
346-
v.r === 0
347-
) {
333+
if (lCommit === rCommit || l === r || v.r === 0) {
348334
return l;
349335
} else {
350336
return `${r}${l}`;
@@ -364,7 +350,7 @@ export function ModelPanel({
364350
const l = Number(v.l);
365351
const r = Number(v.r);
366352

367-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
353+
if (lCommit === rCommit) {
368354
return "";
369355
} else {
370356
if (l === 0 || l === r) {
@@ -394,11 +380,7 @@ export function ModelPanel({
394380
const l = Number(v.l).toFixed(0);
395381
const r = Number(v.r).toFixed(0);
396382

397-
if (
398-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
399-
l === r ||
400-
v.r === 0
401-
) {
383+
if (lCommit === rCommit || l === r || v.r === 0) {
402384
return l;
403385
} else {
404386
return `${r}${l}`;
@@ -418,7 +400,7 @@ export function ModelPanel({
418400
const l = Number(v.l);
419401
const r = Number(v.r);
420402

421-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
403+
if (lCommit === rCommit) {
422404
return l >= COMPRESSION_RATIO_THRESHOLD ? "" : styles.warning;
423405
} else {
424406
if (l === 0 || l === r) {
@@ -452,11 +434,7 @@ export function ModelPanel({
452434
const l = Number(v.l).toFixed(SCALE);
453435
const r = Number(v.r).toFixed(SCALE);
454436

455-
if (
456-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
457-
l === r ||
458-
v.r === 0
459-
) {
437+
if (lCommit === rCommit || l === r || v.r === 0) {
460438
return l;
461439
} else {
462440
return `${r}${l}`;
@@ -476,7 +454,7 @@ export function ModelPanel({
476454
const l = Number(v.l);
477455
const r = Number(v.r);
478456

479-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
457+
if (lCommit === rCommit) {
480458
return "";
481459
} else {
482460
if (l === 0 || l === r) {
@@ -506,11 +484,7 @@ export function ModelPanel({
506484
const l = Number(v.l).toFixed(SCALE);
507485
const r = Number(v.r).toFixed(SCALE);
508486

509-
if (
510-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
511-
l === r ||
512-
v.r === 0
513-
) {
487+
if (lCommit === rCommit || l === r || v.r === 0) {
514488
return l;
515489
} else {
516490
return `${r}${l}`;
@@ -530,7 +504,7 @@ export function ModelPanel({
530504
const l = Number(v.l);
531505
const r = Number(v.r);
532506

533-
if (lDeviceName === rDeviceName && lCommit === rCommit) {
507+
if (lCommit === rCommit) {
534508
return "";
535509
} else {
536510
if (l === 0 || l === r) {
@@ -560,11 +534,7 @@ export function ModelPanel({
560534
const l = Number(v.l).toFixed(2);
561535
const r = Number(v.r).toFixed(2);
562536

563-
if (
564-
(lDeviceName === rDeviceName && lCommit === rCommit) ||
565-
l === r ||
566-
v.r === 0
567-
) {
537+
if (lCommit === rCommit || l === r || v.r === 0) {
568538
return l;
569539
} else {
570540
return `${r}${l}`;

torchci/components/benchmark/compilers/SummaryGraphPanel.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function GraphPanel({
2929
granularity,
3030
suite,
3131
branch,
32-
deviceName,
3332
lCommit,
3433
rCommit,
3534
}: {
@@ -38,7 +37,6 @@ export function GraphPanel({
3837
granularity: Granularity;
3938
suite: string;
4039
branch: string;
41-
deviceName: string;
4240
lCommit: string;
4341
rCommit: string;
4442
}) {
@@ -51,7 +49,6 @@ export function GraphPanel({
5149
granularity={granularity}
5250
suite={suite}
5351
branch={branch}
54-
deviceName={deviceName}
5552
lCommit={lCommit}
5653
rCommit={rCommit}
5754
/>
@@ -64,7 +61,6 @@ function SuiteGraphPanel({
6461
granularity,
6562
suite,
6663
branch,
67-
deviceName,
6864
lCommit,
6965
rCommit,
7066
}: {
@@ -73,7 +69,6 @@ function SuiteGraphPanel({
7369
granularity: Granularity;
7470
suite: string;
7571
branch: string;
76-
deviceName: string;
7772
lCommit: string;
7873
rCommit: string;
7974
}) {

0 commit comments

Comments
 (0)