Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
0d165399
MegEngine
项目概览
MegEngine 天元
/
MegEngine
接近 2 年 前同步成功
通知
414
Star
4708
Fork
583
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
0d165399
编写于
4月 01, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mgb): fix fastrun for imperative
GitOrigin-RevId: db54984b92623a406b15472111fccb0ea07575d3
上级
94401ce4
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
20 addition
and
17 deletion
+20
-17
dnn/include/megdnn/oprs/base.h
dnn/include/megdnn/oprs/base.h
+6
-3
dnn/src/cuda/conv_bias/algo.h
dnn/src/cuda/conv_bias/algo.h
+1
-1
dnn/src/cuda/convolution/backward_data/algo.h
dnn/src/cuda/convolution/backward_data/algo.h
+1
-1
dnn/src/cuda/convolution/backward_filter/algo.h
dnn/src/cuda/convolution/backward_filter/algo.h
+1
-1
dnn/src/cuda/convolution3d/backward_data/algo.h
dnn/src/cuda/convolution3d/backward_data/algo.h
+1
-1
dnn/src/cuda/convolution3d/backward_filter/algo.h
dnn/src/cuda/convolution3d/backward_filter/algo.h
+1
-1
dnn/src/cuda/convolution3d/forward/algo.h
dnn/src/cuda/convolution3d/forward/algo.h
+1
-1
dnn/src/fallback/conv_bias/algos.h
dnn/src/fallback/conv_bias/algos.h
+4
-4
dnn/src/fallback/conv_bias/common.h
dnn/src/fallback/conv_bias/common.h
+1
-1
dnn/src/fallback/conv_bias/conv1x1/algos.h
dnn/src/fallback/conv_bias/conv1x1/algos.h
+1
-1
dnn/src/fallback/conv_bias/im2col/algos.h
dnn/src/fallback/conv_bias/im2col/algos.h
+1
-1
dnn/src/fallback/convolution/algos.h
dnn/src/fallback/convolution/algos.h
+1
-1
未找到文件。
dnn/include/megdnn/oprs/base.h
浏览文件 @
0d165399
...
...
@@ -172,7 +172,10 @@ public:
template
<
typename
T
>
static
void
serialize_write_pod
(
const
T
&
val
,
std
::
string
&
result
)
{
static_assert
(
std
::
is_standard_layout
<
T
>::
value
,
"invalid type"
);
static_assert
(
std
::
is_trivially_copyable
<
T
>::
value
,
"type should be trivially copyable"
);
static_assert
(
!
std
::
is_pointer
<
T
>::
value
,
"serialize pointer is unsafe in eager execution mode"
);
result
.
append
(
reinterpret_cast
<
const
char
*>
(
&
val
),
sizeof
(
T
));
}
...
...
@@ -182,7 +185,7 @@ public:
template
<
typename
T
>
static
T
deserialize_read_pod
(
const
std
::
string
&
data
,
size_t
offset
=
0
)
{
static_assert
(
std
::
is_
standard_layout
<
T
>::
value
,
"invalid type"
);
static_assert
(
std
::
is_
trivially_copyable
<
T
>::
value
,
"invalid type"
);
T
ret
;
//! A pointer to an object or incomplete type may be converted to a
//! pointer to a different object or incomplete type. If the resulting
...
...
@@ -197,7 +200,7 @@ public:
template
<
typename
T
>
static
T
deserialize_read_pod
(
const
char
*
data
,
size_t
offset
=
0
)
{
static_assert
(
std
::
is_
standard_layout
<
T
>::
value
,
"invalid type"
);
static_assert
(
std
::
is_
trivially_copyable
<
T
>::
value
,
"invalid type"
);
T
ret
;
//! A pointer to an object or incomplete type may be converted to a
//! pointer to a different object or incomplete type. If the resulting
...
...
dnn/src/cuda/conv_bias/algo.h
浏览文件 @
0d165399
...
...
@@ -439,7 +439,7 @@ public:
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
...
...
dnn/src/cuda/convolution/backward_data/algo.h
浏览文件 @
0d165399
...
...
@@ -238,7 +238,7 @@ public:
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
};
...
...
dnn/src/cuda/convolution/backward_filter/algo.h
浏览文件 @
0d165399
...
...
@@ -223,7 +223,7 @@ public:
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
};
...
...
dnn/src/cuda/convolution3d/backward_data/algo.h
浏览文件 @
0d165399
...
...
@@ -174,7 +174,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
CUDA_GROUP_CONV_GENERAL
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
};
...
...
dnn/src/cuda/convolution3d/backward_filter/algo.h
浏览文件 @
0d165399
...
...
@@ -183,7 +183,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
CUDA_GROUP_CONV_GENERAL
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
};
...
...
dnn/src/cuda/convolution3d/forward/algo.h
浏览文件 @
0d165399
...
...
@@ -135,7 +135,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
CUDA_GROUP_CONV_GENERAL
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_impl
,
ret
);
serialize_write_pod
(
m_impl
->
name
()
,
ret
);
return
ret
;
}
};
...
...
dnn/src/fallback/conv_bias/algos.h
浏览文件 @
0d165399
...
...
@@ -67,7 +67,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
FB_WINOGRAD_F32
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
return
ret
;
}
...
...
@@ -103,7 +103,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
FB_WINOGRAD_4X4_F32
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
return
ret
;
}
...
...
@@ -139,7 +139,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
FB_WINOGRAD_QS8
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
return
ret
;
}
...
...
@@ -175,7 +175,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
FB_WINOGRAD_8X8_QS8
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
return
ret
;
}
...
...
dnn/src/fallback/conv_bias/common.h
浏览文件 @
0d165399
...
...
@@ -157,7 +157,7 @@ using BiasMode = ConvBiasForward::BiasMode;
} \
std::string param() const override { \
std::string ret; \
serialize_write_pod(m_matmul_algo
, ret);
\
serialize_write_pod(m_matmul_algo
->name(), ret);
\
serialize_write_pod(m_tile_size, ret); \
return ret; \
} \
...
...
dnn/src/fallback/conv_bias/conv1x1/algos.h
浏览文件 @
0d165399
...
...
@@ -65,7 +65,7 @@ public:
MEGDNN_DECL_ALGO_TYPE
(
FB_WINOGRAD_8X8_QS8
)
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
serialize_write_pod
(
m_oc_block_size
,
ret
);
return
ret
;
}
...
...
dnn/src/fallback/conv_bias/im2col/algos.h
浏览文件 @
0d165399
...
...
@@ -74,7 +74,7 @@ public:
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_matmul_algo
,
ret
);
serialize_write_pod
(
m_matmul_algo
->
name
()
,
ret
);
serialize_write_pod
(
m_ohw_tile_size
,
ret
);
return
ret
;
}
...
...
dnn/src/fallback/convolution/algos.h
浏览文件 @
0d165399
...
...
@@ -157,7 +157,7 @@ public:
std
::
string
param
()
const
override
{
std
::
string
ret
;
serialize_write_pod
(
m_algorithm
,
ret
);
serialize_write_pod
(
m_algorithm
->
name
()
,
ret
);
return
ret
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录