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
a9c83bce
"...text-generation-inference.git" did not exist on "27ff1871b507e4f163d7fc6991915f6bb7057f92"
Unverified
Commit
a9c83bce
authored
Oct 26, 2021
by
Jinjing Zhou
Committed by
GitHub
Oct 26, 2021
Browse files
Fix #3437 (#3440)
parent
579cd3eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/dgl/backend/pytorch/sparse.py
python/dgl/backend/pytorch/sparse.py
+2
-2
No files found.
python/dgl/backend/pytorch/sparse.py
View file @
a9c83bce
...
...
@@ -102,7 +102,7 @@ def spmm_cache_Y(binary_op, reduce_op, req_grad_X, req_grad_Y):
def
spmm_cache_argX
(
binary_op
,
reduce_op
,
req_grad_X
,
req_grad_Y
):
"""Rules to identify whether to cache argX in SpMM forward stage."""
if
req_grad_X
:
if
req_grad_X
or
req_grad_Y
:
if
reduce_op
in
[
'min'
,
'max'
]:
return
True
return
False
...
...
@@ -110,7 +110,7 @@ def spmm_cache_argX(binary_op, reduce_op, req_grad_X, req_grad_Y):
def
spmm_cache_argY
(
binary_op
,
reduce_op
,
req_grad_X
,
req_grad_Y
):
"""Rules to identify whether to cache argY in SpMM forward stage."""
if
req_grad_Y
:
if
req_grad_X
or
req_grad_Y
:
if
reduce_op
in
[
'min'
,
'max'
]:
return
True
return
False
...
...
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