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
8eebf5f6
Commit
8eebf5f6
authored
Apr 13, 2018
by
Tianqi Chen
Committed by
GitHub
Apr 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUNTIME] Fault tolerant vulkan init error (#1107)
parent
dc62760e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/runtime/vulkan/vulkan_device_api.cc
+5
-0
No files found.
src/runtime/vulkan/vulkan_device_api.cc
View file @
8eebf5f6
...
@@ -661,6 +661,7 @@ void VulkanWorkspace::Init() {
...
@@ -661,6 +661,7 @@ void VulkanWorkspace::Init() {
std
::
lock_guard
<
std
::
mutex
>
lock
(
this
->
mu
);
std
::
lock_guard
<
std
::
mutex
>
lock
(
this
->
mu
);
if
(
initialized_
)
return
;
if
(
initialized_
)
return
;
initialized_
=
true
;
initialized_
=
true
;
try
{
instance_
=
CreateInstance
();
instance_
=
CreateInstance
();
context_
=
GetContext
(
instance_
);
context_
=
GetContext
(
instance_
);
LOG
(
INFO
)
<<
"Initialzie Vulkan with "
<<
context_
.
size
()
<<
" devices.."
;
LOG
(
INFO
)
<<
"Initialzie Vulkan with "
<<
context_
.
size
()
<<
" devices.."
;
...
@@ -669,6 +670,10 @@ void VulkanWorkspace::Init() {
...
@@ -669,6 +670,10 @@ void VulkanWorkspace::Init() {
<<
")=
\'
"
<<
context_
[
i
].
phy_device_prop
.
deviceName
<<
")=
\'
"
<<
context_
[
i
].
phy_device_prop
.
deviceName
<<
"
\'
phy_dev_id="
<<
context_
[
i
].
phy_device
;
<<
"
\'
phy_dev_id="
<<
context_
[
i
].
phy_device
;
}
}
}
catch
(
const
dmlc
::
Error
&
err
)
{
LOG
(
INFO
)
<<
"Cannot initialize vulkan: "
<<
err
.
what
()
<<
"
\n
"
<<
"You can still compile vulkan module but cannot run locally"
;
}
}
}
bool
InitVulkan
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
bool
InitVulkan
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
...
...
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