Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
dd1c8fa9
Commit
dd1c8fa9
authored
Feb 16, 2018
by
Fenglei Tian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change assert and ngraph error to runtime error
parent
2a89f8b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
gpu_emitter.cpp
src/ngraph/runtime/gpu/gpu_emitter.cpp
+7
-5
No files found.
src/ngraph/runtime/gpu/gpu_emitter.cpp
View file @
dd1c8fa9
...
...
@@ -15,7 +15,6 @@
*******************************************************************************/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cublas_v2.h>
#include <cuda.h>
...
...
@@ -194,9 +193,12 @@ void runtime::gpu::GPU_Emitter::EmitDot(codegen::CodeWriter& writer,
else
if
((
arg0_shape
.
size
()
==
2
)
&&
(
arg1_shape
.
size
()
==
2
))
{
// GEMM Call
assert
(
arg0_shape
[
0
]
==
out
[
0
].
get_shape
()[
0
]);
// m
assert
(
arg1_shape
[
1
]
==
out
[
0
].
get_shape
()[
1
]);
// n
assert
(
arg0_shape
[
1
]
==
arg1_shape
[
0
]);
// k
if
(
arg0_shape
[
0
]
!=
out
[
0
].
get_shape
()[
0
]
||
// m
arg1_shape
[
1
]
!=
out
[
0
].
get_shape
()[
1
]
||
// n
arg0_shape
[
1
]
!=
arg1_shape
[
0
])
// k
{
throw
std
::
runtime_error
(
"input and output shape is not correct for dot;"
);
}
writer
<<
"{ // "
<<
n
->
get_name
()
<<
"
\n
"
;
writer
.
indent
++
;
writer
<<
"static const float alpha = 1.0;
\n
"
;
...
...
@@ -520,7 +522,7 @@ void runtime::gpu::GPU_Emitter::EmitReshape(codegen::CodeWriter& writer,
// Other cases (reordering of axes for tensors with rank>2) are not handled yet.
else
{
throw
ngraph
_error
(
throw
runtime
_error
(
"Axis permutation in reshape is not implemented yet for tensors with rank>2"
);
}
writer
.
indent
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment