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
cb7050c5
Commit
cb7050c5
authored
Aug 06, 2019
by
ghostplant
Committed by
Tianqi Chen
Aug 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quit and clean when TVM is interrupted (#3640)
parent
0d611134
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
python/tvm/__init__.py
+14
-0
No files found.
python/tvm/__init__.py
View file @
cb7050c5
...
...
@@ -18,6 +18,10 @@
"""TVM: Low level DSL/IR stack for tensor computation."""
from
__future__
import
absolute_import
as
_abs
import
multiprocessing
import
sys
import
traceback
from
.
import
_pyversion
from
.
import
tensor
...
...
@@ -59,3 +63,13 @@ from .tag import tag_scope
# Contrib initializers
from
.contrib
import
rocm
as
_rocm
,
nvcc
as
_nvcc
,
sdaccel
as
_sdaccel
# Clean subprocesses when TVM is interrupted
def
tvm_excepthook
(
exctype
,
value
,
trbk
):
print
(
'
\n
'
.
join
(
traceback
.
format_exception
(
exctype
,
value
,
trbk
)))
if
hasattr
(
multiprocessing
,
'active_children'
):
# pylint: disable=not-callable
for
p
in
multiprocessing
.
active_children
():
p
.
terminate
()
sys
.
excepthook
=
tvm_excepthook
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