Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
7d42f9f3
Commit
7d42f9f3
authored
Oct 05, 2017
by
Tianqi Chen
Committed by
GitHub
Oct 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUNTIME] Better error message in cuda launch (#513)
parent
94359722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
src/runtime/cuda/cuda_module.cc
+20
-2
No files found.
src/runtime/cuda/cuda_module.cc
View file @
7d42f9f3
...
...
@@ -169,7 +169,7 @@ class CUDAWrappedFunc {
}
CUstream
strm
=
static_cast
<
CUstream
>
(
CUDAThreadEntry
::
ThreadLocal
()
->
stream
);
ThreadWorkLoad
wl
=
thread_axis_cfg_
.
Extract
(
args
);
CU
DA_DRIVER_CALL
(
cuLaunchKernel
(
CU
result
result
=
cuLaunchKernel
(
fcache_
[
device_id
],
wl
.
grid_dim
(
0
),
wl
.
grid_dim
(
1
),
...
...
@@ -177,7 +177,25 @@ class CUDAWrappedFunc {
wl
.
block_dim
(
0
),
wl
.
block_dim
(
1
),
wl
.
block_dim
(
2
),
0
,
strm
,
void_args
,
0
));
0
,
strm
,
void_args
,
0
);
if
(
result
!=
CUDA_SUCCESS
&&
result
!=
CUDA_ERROR_DEINITIALIZED
)
{
const
char
*
msg
;
cuGetErrorName
(
result
,
&
msg
);
std
::
ostringstream
os
;
os
<<
"CUDALaunch Error: "
<<
msg
<<
"
\n
"
<<
" grid=("
<<
wl
.
grid_dim
(
0
)
<<
","
<<
wl
.
grid_dim
(
1
)
<<
","
<<
wl
.
grid_dim
(
2
)
<<
"), "
<<
" block=("
<<
wl
.
block_dim
(
0
)
<<
","
<<
wl
.
block_dim
(
1
)
<<
","
<<
wl
.
block_dim
(
2
)
<<
")
\n
"
;
std
::
string
cuda
=
m_
->
GetSource
(
""
);
if
(
cuda
.
length
()
!=
0
)
{
os
<<
"// func_name="
<<
func_name_
<<
"
\n
"
<<
"// CUDA Source
\n
"
<<
"// -----------
\n
"
<<
cuda
;
}
LOG
(
FATAL
)
<<
os
.
str
();
}
}
private
:
...
...
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