Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
liupw
numba-DTK
Commits
5be111ee
Commit
5be111ee
authored
Apr 06, 2024
by
dugupeiwen
Browse files
update roc 2
parent
5c70ef66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
numba/core/config.py
numba/core/config.py
+13
-0
No files found.
numba/core/config.py
View file @
5be111ee
...
...
@@ -501,6 +501,19 @@ class _EnvReloader(object):
NUMBA_DEFAULT_NUM_THREADS
=
num_threads_default
()
# HSA Configs
# Disable HSA support
DISABLE_HSA
=
_readenv
(
"NUMBA_DISABLE_HSA"
,
int
,
0
)
# The default number of threads to use.
NUMBA_DEFAULT_NUM_THREADS
=
max
(
1
,
len
(
os
.
sched_getaffinity
(
0
))
if
hasattr
(
os
,
"sched_getaffinity"
)
else
multiprocessing
.
cpu_count
(),
)
# Numba thread pool size (defaults to number of CPUs on the system).
_NUMBA_NUM_THREADS
=
_readenv
(
"NUMBA_NUM_THREADS"
,
int
,
NUMBA_DEFAULT_NUM_THREADS
)
...
...
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