summaryrefslogtreecommitdiffstats
path: root/eval/src/tests/tensor/tensor_conformance/tensor_conformance_test.cpp
blob: daf641143e834c5430bff80a9aef31cd8e4f7edb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/eval/eval/test/tensor_conformance.h>
#include <vespa/eval/eval/simple_tensor_engine.h>
#include <vespa/eval/tensor/default_tensor_engine.h>

using vespalib::eval::SimpleTensorEngine;
using vespalib::eval::test::TensorConformance;
using vespalib::tensor::DefaultTensorEngine;

vespalib::string module_path(TEST_PATH("../../../../"));


TEST("require that reference tensor implementation passes all conformance tests") {
    TEST_DO(TensorConformance::run_tests(module_path, SimpleTensorEngine::ref()));
}

TEST("require that production tensor implementation passes all conformance tests") {
    TEST_DO(TensorConformance::run_tests(module_path, DefaultTensorEngine::ref()));
}

TEST_MAIN() { TEST_RUN_ALL(); }