-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpredictor_disabled.go
52 lines (38 loc) · 999 Bytes
/
predictor_disabled.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// +build !ppc64le
// +build nogpu
// +build cgo
package tensorrt
import "C"
import (
"context"
"github.com/pkg/errors"
"github.com/rai-project/dlframework/framework/options"
)
var (
invalidSystemError = errors.New("invalid system. TensorRT is only available on linux systems")
)
type Predictor struct {
}
func New(ctx context.Context, opts0 ...options.Option) (*Predictor, error) {
return nil, invalidSystemError
}
func (p *Predictor) Predict(ctx context.Context, input []float32) error {
return invalidSystemError
}
func (p *Predictor) ReadPredictionOutput(ctx context.Context) ([]float32, error) {
return nil, nil
}
func (p *Predictor) StartProfiling(name, metadata string) error {
return invalidSystemError
}
func (p *Predictor) EndProfiling() error {
return invalidSystemError
}
func (p *Predictor) DisableProfiling() error {
return invalidSystemError
}
func (p *Predictor) ReadProfile() (string, error) {
return "", invalidSystemError
}
func (p Predictor) Close() {
}