blob: 3a6f25c47a5bf3f3a9ee9966243f17f6df96f495 [file] [log] [blame]
Patrik Gustavssonc8a22f12020-11-18 17:05:50 +01001# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved.
2#
3# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the License); you may
6# not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an AS IS BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# Description:
17# Contains unit tests for get API version for an external consumer
18from ethosu.vela.api import api_version
19from ethosu.vela.api import npu_get_API_version
20
21
22def test_npu_get_API_version():
23 int_version = npu_get_API_version()
24 version_major = int_version >> 16
25 version_minor = 0xFFFF & int_version
26 assert api_version == f"{version_major}.{version_minor}"