Skip to content

Commit 75b3cc9

Browse files
authored
[mlgo] Remove tests involving the size estimator, after PR #139357 (#152813)
We'll remove the size estimator after, this change is to get the `ml-*` build bots green after the aforementioned PR. We never used the size estimator again after the initial DQN-based training. Should we want to again, we now have IR2Vec, which the old estimator was approximating in functionality.
1 parent 8bfb54b commit 75b3cc9

File tree

4 files changed

+11
-26
lines changed

4 files changed

+11
-26
lines changed

llvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@
1313
; RUN: %python %S/../../../../lib/Analysis/models/saved-model-to-tflite.py %t_savedmodel %t
1414
;
1515
; When the bounds are very wide ("no bounds"), all inlinings happen.
16-
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner-model-under-training=%t -training-log=%t1 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=10.0 -S < %s | FileCheck %s --check-prefixes=NOBOUNDS-OUT,CHECK
16+
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model-under-training=%t -training-log=%t1 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=10.0 -S < %s | FileCheck %s --check-prefixes=NOBOUNDS-OUT,CHECK
1717
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t1 | FileCheck %s --check-prefix=NOBOUNDS
1818
;
1919
; When the bounds are very restrictive, the first inlining happens but it's
2020
; considered as "bad" (since it trips over the bounds) and its reward is a
2121
; penalty. However, the mandatory inlining, which is considered next, happens.
2222
; No other inlinings happend.
23-
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner-model-under-training=%t -training-log=%t2 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.0 -S < %s | FileCheck %s --check-prefixes=BOUNDS-OUT,CHECK
23+
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model-under-training=%t -training-log=%t2 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.0 -S < %s | FileCheck %s --check-prefixes=BOUNDS-OUT,CHECK
2424
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t2 | FileCheck %s --check-prefix=BOUNDS
2525
;
2626
; With more restrictive bounds, the first inlining happens and is OK. The
2727
; mandatory inlining happens next, and it trips over the bounds, which then
2828
; forces no further inlinings.
29-
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner-model-under-training=%t -training-log=%t3 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.1 -S < %s | FileCheck %s --check-prefixes=RELAXED-BOUNDS-OUT,CHECK
29+
; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model-under-training=%t -training-log=%t3 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.2 -S < %s | FileCheck %s --check-prefixes=RELAXED-BOUNDS-OUT,CHECK
3030
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t3 | FileCheck %s --check-prefix=RELAXED-BOUNDS
3131

3232
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@@ -52,15 +52,16 @@ define i64 @top() {
5252
}
5353
attributes #0 = { alwaysinline }
5454
; NOBOUNDS: observation: 0
55-
; NOBOUNDS: delta_size: 6
56-
; RELAXED-BOUNDS: delta_size: 6
57-
; BOUNDS: delta_size: 2147483647
55+
; NOBOUNDS: inlining_decision: 1
56+
; RELAXED-BOUNDS: inlining_decision: 1
57+
; BOUNDS: inlining_decision: 1
5858
; NOBOUNDS: observation: 1
59-
; BOUNDS-NOT: observation
60-
; RELAXED-BOUNDS-NOT: observation
61-
; NOBOUNDS: delta_size: -11
59+
; BOUNDS-NOT: observation: 1
60+
; RELAXED-BOUNDS: observation: 1
61+
; NOBOUNDS: inlining_decision: 1
6262
; NOBOUNDS: observation: 2
63-
; NOBOUNDS: delta_size: 4
63+
; NOBOUNDS: inlining_decision
64+
; RELAXED-BOUNDS-NOT: observation: 2
6465

6566
; CHECK-LABEL: @top
6667
; must_be_inlined must always be inlined, so we won't find a call to it in @top()

llvm/test/Transforms/Inline/ML/development-training-log.ll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
; RUN: %python %S/../../../../lib/Analysis/models/gen-inline-oz-test-model.py %t_savedmodel
66
; RUN: %python %S/../../../../lib/Analysis/models/saved-model-to-tflite.py %t_savedmodel %t
77
;
8-
; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner -training-log=%t1 -ml-inliner-model-under-training=%t -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -S < %s
9-
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t1 | FileCheck %s
10-
; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner -training-log=%t2 -ml-inliner-model-under-training=%t -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner-output-spec-override=%S/Inputs/test_output_spec.json -S < %s
11-
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t2 | FileCheck %s --check-prefixes=EXTRA-OUTPUTS,CHECK
12-
; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner -training-log=%t3 -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -S < %s
13-
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t3 | FileCheck %s
148
; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner -training-log=%t4 -ml-inliner-model-under-training=%t -S < %s
159
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t4 | FileCheck %s --check-prefix=NOREWARD
1610
; RUN: opt -enable-ml-inliner=development -passes=scc-oz-module-inliner -training-log=%t5 -S < %s

llvm/test/Transforms/Inline/ML/size-estimator-default.ll

Lines changed: 0 additions & 4 deletions
This file was deleted.

llvm/test/Transforms/Inline/ML/size-estimator-training.ll

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)