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
e8e84fa0
Commit
e8e84fa0
authored
May 11, 2018
by
Yida Wang
Committed by
Tianqi Chen
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make ThreadPool thread local (#1152)
* make ThreadPool thread local * add return
parent
d454f570
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/runtime/thread_pool.cc
+3
-4
No files found.
src/runtime/thread_pool.cc
View file @
e8e84fa0
...
...
@@ -291,9 +291,8 @@ class ThreadPool {
return
res
;
}
static
ThreadPool
*
Global
()
{
static
ThreadPool
inst
;
return
&
inst
;
static
ThreadPool
*
ThreadLocal
()
{
return
dmlc
::
ThreadLocalStore
<
ThreadPool
>::
Get
();
}
private
:
...
...
@@ -331,7 +330,7 @@ int TVMBackendParallelLaunch(
FTVMParallelLambda
flambda
,
void
*
cdata
,
int
num_task
)
{
int
res
=
tvm
::
runtime
::
ThreadPool
::
Glob
al
()
->
Launch
(
int
res
=
tvm
::
runtime
::
ThreadPool
::
ThreadLoc
al
()
->
Launch
(
flambda
,
cdata
,
num_task
,
1
);
return
res
;
}
...
...
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