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
OpenDAS
dgl
Commits
963f8559
Unverified
Commit
963f8559
authored
Oct 18, 2023
by
Andrei Ivanov
Committed by
GitHub
Oct 19, 2023
Browse files
Ralaxing the limit on the possible number of num_workers used. (#6440)
parent
9d5b897a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/dgl/dataloading/dataloader.py
python/dgl/dataloading/dataloader.py
+1
-1
No files found.
python/dgl/dataloading/dataloader.py
View file @
963f8559
...
@@ -1227,7 +1227,7 @@ class DataLoader(torch.utils.data.DataLoader):
...
@@ -1227,7 +1227,7 @@ class DataLoader(torch.utils.data.DataLoader):
else
:
else
:
node0_cores
=
list
(
range
(
psutil
.
cpu_count
(
logical
=
False
)))
node0_cores
=
list
(
range
(
psutil
.
cpu_count
(
logical
=
False
)))
if
len
(
node0_cores
)
<
=
self
.
num_workers
:
if
len
(
node0_cores
)
<
self
.
num_workers
:
raise
Exception
(
"ERROR: more workers than available cores"
)
raise
Exception
(
"ERROR: more workers than available cores"
)
loader_cores
=
loader_cores
or
node0_cores
[
0
:
self
.
num_workers
]
loader_cores
=
loader_cores
or
node0_cores
[
0
:
self
.
num_workers
]
...
...
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