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
ColossalAI
Commits
ab54fed2
Unverified
Commit
ab54fed2
authored
Dec 22, 2022
by
Tongping Liu
Committed by
GitHub
Dec 22, 2022
Browse files
[hotfix] add kwargs for colo_addmm (#2171)
parent
a110933d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
colossalai/nn/_ops/addmm.py
colossalai/nn/_ops/addmm.py
+2
-2
No files found.
colossalai/nn/_ops/addmm.py
View file @
ab54fed2
...
...
@@ -55,7 +55,7 @@ def colo_addmm(input_tensor: GeneralTensor,
mat2
:
ColoTensor
,
beta
:
Number
=
1
,
alpha
:
Number
=
1
,
*
args
)
->
ColoTensor
:
*
*
k
args
)
->
ColoTensor
:
"""Handles ``__torch_function__`` dispatch for ``torch.nn.functional.linear``.
This method computes a linear.
"""
...
...
@@ -70,7 +70,7 @@ def colo_addmm(input_tensor: GeneralTensor,
assert
mat2
.
is_replicate
(),
'Invalid mat2 spec for native addmm op'
assert
input_tensor
.
is_replicate
(),
'Invalid input spec for native addmm op'
ret_tensor
=
ColoTensor
.
from_torch_tensor
(
tensor
=
torch
.
addmm
(
input_tensor
,
mat1
,
mat2
,
beta
=
beta
,
alpha
=
alpha
),
tensor
=
torch
.
addmm
(
input_tensor
,
mat1
,
mat2
,
beta
=
beta
,
alpha
=
alpha
,
**
kargs
),
spec
=
ColoTensorSpec
(
mat2
.
get_process_group
()))
elif
mat2
.
has_compute_pattern
(
ComputePattern
.
TP1D
):
# Single Model Parallel Applied
if
mat2
.
is_shard_1drow
()
and
input_tensor
.
is_replicate
():
...
...
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