Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OAID
Tengine
提交
3bca4649
T
Tengine
项目概览
OAID
/
Tengine
11 个月 前同步成功
通知
53
Star
4429
Fork
1032
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3bca4649
编写于
4月 09, 2021
作者:
B
BUG1989
提交者:
GitHub
4月 09, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix, some bug of rv64 cpu implement (#613)
上级
c7989a4b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
9 deletion
+16
-9
include/compiler_fp16.h
include/compiler_fp16.h
+1
-1
src/dev/cpu/op/cast/compiler_fp16.h
src/dev/cpu/op/cast/compiler_fp16.h
+1
-1
src/dev/cpu/op/conv/conv_hcl_rv64.c
src/dev/cpu/op/conv/conv_hcl_rv64.c
+4
-1
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.c
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.c
+8
-2
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.h
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.h
+2
-2
src/dev/cpu/op/rv64/sgemm_4x16.S
src/dev/cpu/op/rv64/sgemm_4x16.S
+0
-1
src/dev/cpu/op/rv64/sgemm_4x4.S
src/dev/cpu/op/rv64/sgemm_4x4.S
+0
-1
未找到文件。
include/compiler_fp16.h
浏览文件 @
3bca4649
...
...
@@ -32,7 +32,7 @@
extern
"C"
{
#endif
#if
def __ARM_ARCH
#if
defined __ARM_ARCH || defined __riscv
#define fp16_to_fp32(data) \
({ \
...
...
src/dev/cpu/op/cast/compiler_fp16.h
浏览文件 @
3bca4649
...
...
@@ -33,7 +33,7 @@ extern "C" {
#else
#if
def __ARM_ARCH
#if
defined __ARM_ARCH || defined __riscv
#define fp16_to_fp32(data) \
({ \
...
...
src/dev/cpu/op/conv/conv_hcl_rv64.c
浏览文件 @
3bca4649
...
...
@@ -17,6 +17,10 @@
* under the License.
*/
/*
* Copyright (c) 2021, OPEN AI LAB
* Author: ddzhao@openailab.com
*/
#include "sys_port.h"
#include "module.h"
...
...
@@ -92,7 +96,6 @@ static int prerun(struct node_ops* node_ops, struct exec_node* exec_node, struct
static
int
run
(
struct
node_ops
*
node_ops
,
struct
exec_node
*
exec_node
,
struct
exec_graph
*
exec_graph
)
{
fprintf
(
stderr
,
"conv hcl start
\n
"
);
struct
ir_node
*
ir_node
=
exec_node
->
ir_node
;
struct
ir_graph
*
ir_graph
=
ir_node
->
graph
;
struct
ir_tensor
*
input_tensor
;
...
...
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.c
浏览文件 @
3bca4649
...
...
@@ -18,9 +18,10 @@
*/
/*
* Copyright (c) 202
0
, OPEN AI LAB
* Author:
haolu
o@openailab.com
* Copyright (c) 202
1
, OPEN AI LAB
* Author:
ddzha
o@openailab.com
*/
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
...
...
@@ -381,6 +382,11 @@ static void sgemm4x4(float* col, float* kernel, float* biases, float* output, in
{
cur_col
=
(
float
*
)(
col
+
col_line
*
kernel_size
);
sgemm_4x4_rv64
(
cur_biases
,
cur_col
,
cur_kernel
,
kernel_size
,
result
,
4
,
activation
,
0
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
j
=
0
;
j
<
(
col_end3
);
j
++
)
*
(
output
+
(
kernel_num
+
i
)
*
output_xy
+
col_line
+
j
)
=
result
[(
i
<<
2
)
+
j
];
}
}
}
if
(
kernel_end3
)
...
...
src/dev/cpu/op/conv/rv64/conv_kernel_rv64.h
浏览文件 @
3bca4649
...
...
@@ -18,8 +18,8 @@
*/
/*
* Copyright (c) 202
0, Martin Han
* Author:
hansh-sz@hotmail
.com
* Copyright (c) 202
1, OPEN AI LAB
* Author:
ddzhao@openailab
.com
*/
#ifndef _CONV_KERNEL_RV64_H_
...
...
src/dev/cpu/op/rv64/sgemm_4x16
_a72
.S
→
src/dev/cpu/op/rv64/sgemm_4x16.S
浏览文件 @
3bca4649
...
...
@@ -36,7 +36,6 @@
//
input
4
x
p
kernel
p
x
16
biases
4
x
16
output
4
x
16
p
=
kernel
size
//
//
//
optimised
for
Cortex
-
A72
pipeline
64
cycle
per
loop
(
4
*
16
*
4
dot
product
)
//
load
4
more
input
and
8
more
kernel
to
improve
loop
performance
//
//
input
:
...
...
src/dev/cpu/op/rv64/sgemm_4x4
_a72
.S
→
src/dev/cpu/op/rv64/sgemm_4x4.S
浏览文件 @
3bca4649
...
...
@@ -36,7 +36,6 @@
//
input
4
x
p
kernel
p
x
4
biases
4
x
4
output
4
x
4
p
=
kernel
size
//
//
//
optimised
for
Cortex
-
A72
pipeline
18
cycle
per
loop
(
4
*
4
*
4
dot
product
)
//
//
input
:
//
x0
arg0
biases
address
{
b0
,
b1
,
b2
,
b3
}
nullptr
means
no
biases
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录