llvm-project/llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll
Mircea Trofin 5898be19e6 [mlgo] Remove the protobuf dependency
The dependency was due to the log format. This change switches to the
previously-introduced (D139370) "dependency-free" logger instead of the
protobuf-based one.

A subsequent change will clean out the unnecessary abstraction left
behind.

This change drops the logger unittest, we have sufficient test coverage
via lit tests, and a unit test would require adding, unnecesarily, a log
reader (the reader is expected to be python, for the ML side, and there
is a reader for that under Analysis/models, used for tests).

Differential Revision: https://reviews.llvm.org/D141720
2023-01-17 13:12:27 -08:00

29 lines
1.2 KiB
LLVM

; REQUIRES: have_tflite
; REQUIRES: x86_64-linux
;
; Check that we log correctly, both with a learned policy, and the default policy
;
; RUN: llc -o /dev/null -mtriple=x86_64-linux-unknown -regalloc=greedy \
; RUN: -regalloc-enable-priority-advisor=development \
; RUN: -regalloc-priority-training-log=%t1 \
; RUN: < %S/Inputs/input.ll
; RUN: %python %S/../../../lib/Analysis/models/log_reader.py %t1 > %t1.readable
; RUN: FileCheck --input-file %t1.readable %s --check-prefixes=CHECK,NOML
; RUN: diff %t1.readable %S/Inputs/reference-prio-log-noml.txt
; RUN: rm -rf %t && mkdir %t
; RUN: %python %S/../../../lib/Analysis/models/gen-regalloc-priority-test-model.py %t_savedmodel
; RUN: %python %S/../../../lib/Analysis/models/saved-model-to-tflite.py %t_savedmodel %t
; RUN: llc -o /dev/null -mtriple=x86_64-linux-unknown -regalloc=greedy \
; RUN: -regalloc-enable-priority-advisor=development \
; RUN: -regalloc-priority-training-log=%t2 \
; RUN: -regalloc-priority-model=%t < %S/Inputs/input.ll
; RUN: %python %S/../../../lib/Analysis/models/log_reader.py %t2 > %t2.readable
; RUN: FileCheck --input-file %t2.readable %s --check-prefixes=CHECK,ML
; CHECK-NOT: nan
; CHECK-LABEL: priority:
; NOML-SAME: 2684358144.0
; ML-SAME: 3551
; CHECK-LABEL: reward: