Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
NiuTrans.Tensor
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
Emmay
NiuTrans.Tensor
Commits
863f4585
Commit
863f4585
authored
Jul 16, 2018
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bad code for delete operations
parent
66855df5
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
9 行删除
+7
-9
source/tensor/core/arithmetic/MatrixMul.h
+3
-4
source/tensor/test/TCopyValues.cpp
+0
-3
source/tensor/test/TSplit.cpp
+4
-2
没有找到文件。
source/tensor/core/arithmetic/MatrixMul.h
查看文件 @
863f4585
...
...
@@ -39,7 +39,7 @@ C should be a tensor of z * x * n * m.
Obviously C = A * B performs normal matrix multiplication if A = y * z and B = x * y.
*/
void
_MatrixMul
(
const
XTensor
*
a
,
MATRIX_TRANS_TYPE
transposedA
,
const
XTensor
*
b
,
MATRIX_TRANS_TYPE
transposedB
,
XTensor
*
c
,
DTYPE
alpha
=
(
DTYPE
)
1
.
0
,
DTYPE
beta
=
0
,
XPRunner
*
parallelRunner
=
NULL
);
DTYPE
alpha
=
(
DTYPE
)
1
.
0
,
DTYPE
beta
=
0
,
XPRunner
*
parallelRunner
=
NULL
);
/*
matrix multiplication (return a XTensor structure)
...
...
@@ -55,8 +55,8 @@ C should be a tensor of z * x * n * m.
Obviously C = A * B performs normal matrix multiplication if A = y * z and B = x * y.
*/
XTensor
MatrixMul
(
const
XTensor
&
a
,
MATRIX_TRANS_TYPE
transposedA
,
const
XTensor
&
b
,
MATRIX_TRANS_TYPE
transposedB
,
DTYPE
alpha
=
(
DTYPE
)
1
.
0
,
DTYPE
beta
=
0
,
XPRunner
*
parallelRunner
=
NULL
);
DTYPE
alpha
=
(
DTYPE
)
1
.
0
,
DTYPE
beta
=
0
,
XPRunner
*
parallelRunner
=
NULL
);
}
// namespace nts(NiuTrans.Tensor)
#endif // __MATRIXMUL_H__
\ No newline at end of file
#endif // __MATRIXMUL_H__
source/tensor/test/TCopyValues.cpp
查看文件 @
863f4585
...
...
@@ -40,9 +40,6 @@ bool TestCopyValues1()
DTYPE
sData
[
2
][
4
]
=
{
{
0.0
F
,
1.0
F
,
2.0
F
,
3.0
F
},
{
4.0
F
,
5.0
F
,
6.0
F
,
7.0
F
}
};
DTYPE
scaleFactor
=
2.0
F
;
DTYPE
shiftFactor
=
0.5
F
;
/* CPU test */
bool
cpuTest
=
true
;
...
...
source/tensor/test/TSplit.cpp
查看文件 @
863f4585
...
...
@@ -101,8 +101,10 @@ bool TestSplit1()
return
cpuTest
&&
gpuTest
;
#else
/* destroy variables */
delete
s
,
t
;
delete
[]
sDimSize
,
tDimSize
;
delete
s
;
delete
t
;
delete
[]
sDimSize
;
delete
[]
tDimSize
;
return
cpuTest
;
#endif // USE_CUDA
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论