3 # Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT 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.
17 filename_ext="$(basename -- $0)"
18 filename="${filename_ext%.*}"
20 # TODO Resolve circledump not found
21 # https://github.com/Samsung/ONE/issues/10550
22 if ! command -v circledump &> /dev/null
24 echo "${filename_ext} SKIPPED"
30 echo "${filename_ext} FAILED"
34 trap trap_err_onexit ERR
36 inputfile="./reshape_matmul.circle"
37 configfile="onecc_045.cfg"
38 outputfile="reshape_matmul.onecc_045.q.circle"
41 rm -f ${filename}.first.cdump
42 rm -f ${filename}.second.cdump
46 onecc -C ${configfile} > ${filename}.log 2>&1
48 if [[ ! -s "${outputfile}" ]]; then
52 circledump ${outputfile} | grep serving_default_l.1:0$ > ${filename}.first.cdump
53 circledump ${outputfile} | grep serving_default_r.1:0$ > ${filename}.second.cdump
55 # check dtype of the first input (uint8)
56 if ! grep -q "UINT8" "${filename}.first.cdump"; then
60 # check dtype of the second input (int16)
61 if ! grep -q "INT16" "${filename}.second.cdump"; then
65 echo "${filename_ext} SUCCESS"