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
torch-scatter
Commits
fe83843b
Unverified
Commit
fe83843b
authored
Dec 09, 2022
by
HunterTracer
Committed by
GitHub
Dec 09, 2022
Browse files
add SCATTER_API definition for scatter_mul in scatter.cpp & scatter.h (#344)
Co-authored-by:
zenghongtai
<
1518445275@qq.com
>
parent
111ffc42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
csrc/scatter.cpp
csrc/scatter.cpp
+4
-3
csrc/scatter.h
csrc/scatter.h
+5
-0
No files found.
csrc/scatter.cpp
View file @
fe83843b
...
...
@@ -239,9 +239,10 @@ scatter_sum(torch::Tensor src, torch::Tensor index, int64_t dim,
return
ScatterSum
::
apply
(
src
,
index
,
dim
,
optional_out
,
dim_size
)[
0
];
}
torch
::
Tensor
scatter_mul
(
torch
::
Tensor
src
,
torch
::
Tensor
index
,
int64_t
dim
,
torch
::
optional
<
torch
::
Tensor
>
optional_out
,
torch
::
optional
<
int64_t
>
dim_size
)
{
SCATTER_API
torch
::
Tensor
scatter_mul
(
torch
::
Tensor
src
,
torch
::
Tensor
index
,
int64_t
dim
,
torch
::
optional
<
torch
::
Tensor
>
optional_out
,
torch
::
optional
<
int64_t
>
dim_size
)
{
return
ScatterMul
::
apply
(
src
,
index
,
dim
,
optional_out
,
dim_size
)[
0
];
}
...
...
csrc/scatter.h
View file @
fe83843b
...
...
@@ -15,6 +15,11 @@ scatter_sum(torch::Tensor src, torch::Tensor index, int64_t dim,
torch
::
optional
<
torch
::
Tensor
>
optional_out
,
torch
::
optional
<
int64_t
>
dim_size
);
SCATTER_API
torch
::
Tensor
scatter_mul
(
torch
::
Tensor
src
,
torch
::
Tensor
index
,
int64_t
dim
,
torch
::
optional
<
torch
::
Tensor
>
optional_out
,
torch
::
optional
<
int64_t
>
dim_size
);
SCATTER_API
torch
::
Tensor
scatter_mean
(
torch
::
Tensor
src
,
torch
::
Tensor
index
,
int64_t
dim
,
torch
::
optional
<
torch
::
Tensor
>
optional_out
,
...
...
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