LLVM
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
o
p
q
r
s
t
u
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
include
llvm
Analysis
NoInferenceModelRunner.h
Go to the documentation of this file.
1
//===- NoInferenceModelRunner.h ---- noop ML model runner ------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
10
#ifndef LLVM_ANALYSIS_NOINFERENCEMODELRUNNER_H
11
#define LLVM_ANALYSIS_NOINFERENCEMODELRUNNER_H
12
13
#include "
llvm/Analysis/MLModelRunner.h
"
14
namespace
llvm
{
15
class
TensorSpec;
16
17
/// A pseudo model runner. We use it to store feature values when collecting
18
/// logs for the default policy, in 'development' mode, but never ask it to
19
/// 'run'.
20
class
NoInferenceModelRunner
:
public
MLModelRunner
{
21
public
:
22
NoInferenceModelRunner
(
LLVMContext
&
Ctx
,
23
const
std::vector<TensorSpec> &Inputs);
24
25
static
bool
classof
(
const
MLModelRunner
*R) {
26
return
R->getKind() ==
MLModelRunner::Kind::NoOp
;
27
}
28
29
private
:
30
void
*evaluateUntyped()
override
{
31
llvm_unreachable
(
"We shouldn't call run on this model runner."
);
32
}
33
};
34
}
// namespace llvm
35
#endif
// LLVM_ANALYSIS_NOINFERENCEMODELRUNNER_H
MLModelRunner.h
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition:
LLVMContext.h:67
llvm::MLModelRunner
MLModelRunner interface: abstraction of a mechanism for evaluating a ML model.
Definition:
MLModelRunner.h:26
llvm::MLModelRunner::Kind::NoOp
@ NoOp
llvm::MLModelRunner::Ctx
LLVMContext & Ctx
Definition:
MLModelRunner.h:72
llvm::NoInferenceModelRunner
A pseudo model runner.
Definition:
NoInferenceModelRunner.h:20
llvm::NoInferenceModelRunner::classof
static bool classof(const MLModelRunner *R)
Definition:
NoInferenceModelRunner.h:25
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition:
ErrorHandling.h:143
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Fri Jan 31 2025 21:38:11 for LLVM by
1.9.6