summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/globalphase_onnx_inside/test.sd
blob: f5788611b0aac34d685bdfb220d01d53b837d63a (plain) (blame)
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
53
54
schema test {

    document test {
        field aa type tensor(d1[3]) {
            indexing: attribute
        }
        field extra type float {
            indexing: attribute
        }
    }

    constant xx {
        file: files/const_xx.json
        type: tensor(d0[2],d1[3])
    }
    constant ww {
        file: files/const_ww.json
        type: tensor(d0[2])
    }

    rank-profile default {
        inputs {
            query(bb) tensor(d0[2])
            query(yy) tensor(d0[2])
        }
        onnx-model inside {
            file: files/ax_plus_b.onnx
            input vector_A: indirect_a
            input matrix_X: indirect_x
            input vector_B: indirect_b
            output vector_Y: foobar
        }
        first-phase {
            expression: sum(attribute(aa))
        }
        function handicap() {
            expression: query(yy)
        }
        global-phase {
            rerank-count: 13
            expression: sum(constant(ww) * (onnx(inside).foobar - handicap))
        }
        function indirect_a() {
            expression: attribute(aa) + tensor(d1[3])(d1+attribute(extra))
        }
        function indirect_x() {
            expression: constant(xx)
        }
        function indirect_b() {
            expression: query(bb)
        }
    }

}