Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
码匠许师傅
Tflite Micro
提交
03117c2d
T
Tflite Micro
项目概览
码匠许师傅
/
Tflite Micro
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tflite Micro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
03117c2d
编写于
5月 14, 2021
作者:
T
TFLM-bot
提交者:
GitHub
5月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Automated sync from github.com/tensorflow/tensorflow (#75)
上级
8da1c45d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
81 addition
and
24 deletion
+81
-24
tensorflow/lite/micro/kernels/BUILD
tensorflow/lite/micro/kernels/BUILD
+2
-2
tensorflow/lite/micro/tools/make/arm_gcc_download.sh
tensorflow/lite/micro/tools/make/arm_gcc_download.sh
+27
-6
tensorflow/lite/micro/tools/make/flatbuffers_download.sh
tensorflow/lite/micro/tools/make/flatbuffers_download.sh
+8
-8
tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc
...cro/tools/make/targets/cortex_m_corstone_300_makefile.inc
+22
-4
tensorflow/lite/micro/tools/make/targets/cortex_m_generic_makefile.inc
...te/micro/tools/make/targets/cortex_m_generic_makefile.inc
+22
-4
未找到文件。
tensorflow/lite/micro/kernels/BUILD
浏览文件 @
03117c2d
...
...
@@ -348,7 +348,7 @@ cc_library(
":kernel_util"
,
":micro_utils"
,
":xtensa"
,
"@flatbuffers"
,
"@flatbuffers
//:runtime_cc
"
,
"//tensorflow/lite/c:common"
,
"//tensorflow/lite/kernels:kernel_util"
,
"//tensorflow/lite/kernels:op_macros"
,
...
...
@@ -620,7 +620,7 @@ cc_test(
"//tensorflow/lite/kernels/internal:tensor"
,
"//tensorflow/lite/micro:test_helpers"
,
"//tensorflow/lite/micro/testing:micro_test"
,
"@flatbuffers"
,
"@flatbuffers
//:runtime_cc
"
,
],
)
...
...
tensorflow/lite/micro/tools/make/arm_gcc_download.sh
浏览文件 @
03117c2d
...
...
@@ -49,24 +49,45 @@ if [ -d ${DOWNLOADED_GCC_PATH} ]; then
echo
>
&2
"
${
DOWNLOADED_GCC_PATH
}
already exists, skipping the download."
else
UNAME_S
=
`
uname
-s
`
if
[
${
UNAME_S
}
==
Linux
]
;
then
HOST_OS
=
if
[
"
${
OS
}
"
==
"Windows_NT"
]
;
then
HOST_OS
=
windows
else
UNAME_S
=
`
uname
-s
`
if
[
"
${
UNAME_S
}
"
==
"Linux"
]
;
then
HOST_OS
=
linux
elif
[
"
${
UNAME_S
}
"
==
"Darwin"
]
;
then
HOST_OS
=
osx
fi
fi
if
[
"
${
HOST_OS
}
"
==
"linux"
]
;
then
GCC_URL
=
"https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2"
EXPECTED_MD5
=
"8312c4c91799885f222f663fc81f9a31"
elif
[
${
UNAME_S
}
==
Darwin
]
;
then
elif
[
"
${
HOST_OS
}
"
==
"osx"
]
;
then
GCC_URL
=
"https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-mac.tar.bz2"
EXPECTED_MD5
=
"e588d21be5a0cc9caa60938d2422b058"
elif
[
"
${
HOST_OS
}
"
==
"windows"
]
;
then
GCC_URL
=
"https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip"
EXPECTED_MD5
=
"5ee6542a2af847934177bc8fa1294c0d"
else
echo
"OS type
${
UNAME_
S
}
not supported."
echo
"OS type
${
HOST_O
S
}
not supported."
exit
1
fi
TEMPFILE
=
$(
mktemp
-d
)
/temp_file
TEMPDIR
=
$(
mktemp
-d
)
TEMPFILE
=
${
TEMPDIR
}
/temp_file
wget
${
GCC_URL
}
-O
${
TEMPFILE
}
>
&2
check_md5
${
TEMPFILE
}
${
EXPECTED_MD5
}
mkdir
${
DOWNLOADED_GCC_PATH
}
tar
-C
${
DOWNLOADED_GCC_PATH
}
--strip-components
=
1
-xjf
${
TEMPFILE
}
>
&2
if
[
"
${
HOST_OS
}
"
==
"windows"
]
;
then
unzip
-q
${
TEMPFILE
}
-d
${
TEMPDIR
}
>
&2
mv
${
TEMPDIR
}
/
*
/
*
${
DOWNLOADED_GCC_PATH
}
else
tar
-C
${
DOWNLOADED_GCC_PATH
}
--strip-components
=
1
-xjf
${
TEMPFILE
}
>
&2
fi
echo
>
&2
"Unpacked to directory:
${
DOWNLOADED_GCC_PATH
}
"
fi
...
...
tensorflow/lite/micro/tools/make/flatbuffers_download.sh
浏览文件 @
03117c2d
#!/bin/bash
# Copyright 20
19
The TensorFlow Authors. All Rights Reserved.
# Copyright 20
21
The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -94,14 +94,14 @@ else
FLATBUFFERS_URL
=
"http://mirror.tensorflow.org/github.com/google/flatbuffers/archive/
${
ZIP_PREFIX
}
.zip"
FLATBUFFERS_MD5
=
"aa9adc93eb9b33fa1a2a90969e48baee"
TMPDIR
=
"
$(
mktemp
-d
)
"
T
MPFILE
=
"
${
T
MPDIR
}
/
${
ZIP_PREFIX
}
.zip"
wget
${
FLATBUFFERS_URL
}
-O
"
$TMPFILE
"
>
&2
check_md5
"
${
TMPFILE
}
"
${
FLATBUFFERS_MD5
}
T
E
MPDIR
=
"
$(
mktemp
-d
)
"
T
EMPFILE
=
"
${
TE
MPDIR
}
/
${
ZIP_PREFIX
}
.zip"
wget
${
FLATBUFFERS_URL
}
-O
"
$T
E
MPFILE
"
>
&2
check_md5
"
${
T
E
MPFILE
}
"
${
FLATBUFFERS_MD5
}
unzip
-qo
"
$T
MPFILE
"
-d
"
${
T
MPDIR
}
"
>
&2
mv
"
${
TMPDIR
}
/flatbuffers-
${
ZIP_PREFIX
}
"
${
DOWNLOADED_FLATBUFFERS_PATH
}
rm
-rf
"
${
TMPDIR
}
"
unzip
-qo
"
$T
EMPFILE
"
-d
"
${
TE
MPDIR
}
"
>
&2
mv
"
${
T
E
MPDIR
}
/flatbuffers-
${
ZIP_PREFIX
}
"
${
DOWNLOADED_FLATBUFFERS_PATH
}
rm
-rf
"
${
T
E
MPDIR
}
"
patch_to_avoid_strtod
${
DOWNLOADED_FLATBUFFERS_PATH
}
/include/flatbuffers/flexbuffers.h
delete_build_files
${
DOWNLOADED_FLATBUFFERS_PATH
}
...
...
tensorflow/lite/micro/tools/make/targets/cortex_m_corstone_300_makefile.inc
浏览文件 @
03117c2d
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# ARM Cortex M makefile targeted for a FVP based on Arm Corstone-300 software.
# For more info see: tensorflow/lite/micro/cortex_m_corstone_300/README.md
...
...
@@ -88,10 +103,13 @@ ifneq ($(filter cortex-m55%,$(TARGET_ARCH)),)
endif
ifeq
(
$
(
TOOLCHAIN
),
gcc
)
export
PATH
:=
$
(
MAKEFILE_DIR
)
/
downloads
/
gcc_embedded
/
bin
/:
$
(
PATH
)
DOWNLOAD_RESULT
:=
$
(
shell
$
(
MAKEFILE_DIR
)
/
arm_gcc_download
.
sh
$
{
MAKEFILE_DIR
}
/
downloads
)
ifneq
(
$
(
DOWNLOAD_RESULT
),
SUCCESS
)
$
(
error
Something
went
wrong
with
the
GCC
download
:
$
(
DOWNLOAD_RESULT
))
TARGET_DEFAULT_TOOLCHAIN_ROOT
:=
$
(
MAKEFILE_DIR
)
/
downloads
/
gcc_embedded
/
bin
/
TARGET_TOOLCHAIN_ROOT
:=
$
(
TARGET_DEFAULT_TOOLCHAIN_ROOT
)
ifeq
(
$
(
TARGET_TOOLCHAIN_ROOT
),
$
(
TARGET_DEFAULT_TOOLCHAIN_ROOT
))
DOWNLOAD_RESULT
:=
$
(
shell
$
(
MAKEFILE_DIR
)
/
arm_gcc_download
.
sh
$
{
MAKEFILE_DIR
}
/
downloads
)
ifneq
(
$
(
DOWNLOAD_RESULT
),
SUCCESS
)
$
(
error
Something
went
wrong
with
the
GCC
download
:
$
(
DOWNLOAD_RESULT
))
endif
endif
TARGET_TOOLCHAIN_PREFIX
:=
arm
-
none
-
eabi
-
...
...
tensorflow/lite/micro/tools/make/targets/cortex_m_generic_makefile.inc
浏览文件 @
03117c2d
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Generic Makefile target for ARM Cortex M builds.
# For more info see: tensorflow/lite/micro/cortex_m_generic/README.md
...
...
@@ -95,10 +110,13 @@ ifeq ($(TOOLCHAIN), armclang)
MICROLITE_LIBS
:=
$
(
filter
-
out
-
lm
,
$
(
MICROLITE_LIBS
))
else
ifeq
(
$
(
TOOLCHAIN
),
gcc
)
export
PATH
:=
$
(
MAKEFILE_DIR
)
/
downloads
/
gcc_embedded
/
bin
/:
$
(
PATH
)
DOWNLOAD_RESULT
:=
$
(
shell
$
(
MAKEFILE_DIR
)
/
arm_gcc_download
.
sh
$
{
MAKEFILE_DIR
}
/
downloads
)
ifneq
(
$
(
DOWNLOAD_RESULT
),
SUCCESS
)
$
(
error
Something
went
wrong
with
the
GCC
download
:
$
(
DOWNLOAD_RESULT
))
TARGET_DEFAULT_TOOLCHAIN_ROOT
:=
$
(
MAKEFILE_DIR
)
/
downloads
/
gcc_embedded
/
bin
/
TARGET_TOOLCHAIN_ROOT
:=
$
(
TARGET_DEFAULT_TOOLCHAIN_ROOT
)
ifeq
(
$
(
TARGET_TOOLCHAIN_ROOT
),
$
(
TARGET_DEFAULT_TOOLCHAIN_ROOT
))
DOWNLOAD_RESULT
:=
$
(
shell
$
(
MAKEFILE_DIR
)
/
arm_gcc_download
.
sh
$
{
MAKEFILE_DIR
}
/
downloads
)
ifneq
(
$
(
DOWNLOAD_RESULT
),
SUCCESS
)
$
(
error
Something
went
wrong
with
the
GCC
download
:
$
(
DOWNLOAD_RESULT
))
endif
endif
TARGET_TOOLCHAIN_PREFIX
:=
arm
-
none
-
eabi
-
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录