Commit e2bc39b
authored
Init runtime PAL in RunnerTest (forward fix for D108707577) (#20319)
Summary:
Forward fix for D108707577 (llm_runner: plumb prefill temperature,
#20244).
The new test RunnerTest.TextTokenGeneratorRejectsTemperatureOutOfRange
aborts:
[ RUN ] RunnerTest.TextTokenGeneratorRejectsTemperatureOutOfRange
ExecuTorch PAL must be initialized before call to et_pal_current_ticks()
*** Signal 6 (SIGABRT) ***
The new test drives the temperature-rejection path, which emits an
ET_LOG (and
thus calls et_pal_current_ticks()) before any model load. The RunnerTest
fixture
never initializes the ExecuTorch runtime, so the timer call aborts. The
valid-
temperature tests in the same fixture pass because their happy path does
not log.
Fix: initialize the runtime in RunnerTest::SetUp(), matching the
established
pattern used by the sibling tests in this same directory
(test_text_prefiller,
test_util, test_wav_loader all call executorch::runtime::runtime_init()
in
SetUp()). Applied to both the fbcode and xplat copies.
Differential Revision: D1088313221 parent fa5fc74 commit e2bc39b
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
| |||
0 commit comments