aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/vector_constant/test.sd
blob: 5bb9b54b86bbf93c9b22e42249915344585cbf1a (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
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema test {
    document test {
        field extra type string {
        }
    }
    constant xx {
        file: const_xx.json
        type: tensor(d0[2],d1[3])
    }
    rank-profile default {
        constants {
            constant(aa) tensor(d1[3]): [1,2,3]
            bb           tensor(d0[2]): [4,5]
	   dd           double:        2
        }
        function indirect_a() {
            expression: tensor(d1[3]): [constant(dd), constant(aa){d1:0}, constant(bb){d0:(constant(dd))}]
        }
        onnx-model inside {
            file: ax_plus_b.onnx
            input vector_A: indirect_a
            input matrix_X: constant(xx)
            input vector_B: constant(bb)
            output vector_Y: foobar
        }
        first-phase {
            expression: sum(onnx(inside).foobar)
        }
        # function unused() {
        #    expression: constant(aa)*constant(bb)
        # }
    }
}