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-harmonics
Commits
c18fba3d
Commit
c18fba3d
authored
Jul 21, 2025
by
Andrea Paris
Committed by
Boris Bonev
Jul 21, 2025
Browse files
restored comment
parent
67370881
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
torch_harmonics/_disco_convolution.py
torch_harmonics/_disco_convolution.py
+6
-0
No files found.
torch_harmonics/_disco_convolution.py
View file @
c18fba3d
...
@@ -139,6 +139,12 @@ def _disco_s2_transpose_contraction_cuda(x: torch.Tensor, roff_idx: torch.Tensor
...
@@ -139,6 +139,12 @@ def _disco_s2_transpose_contraction_cuda(x: torch.Tensor, roff_idx: torch.Tensor
def
_disco_s2_contraction_torch
(
x
:
torch
.
Tensor
,
psi
:
torch
.
Tensor
,
nlon_out
:
int
):
def
_disco_s2_contraction_torch
(
x
:
torch
.
Tensor
,
psi
:
torch
.
Tensor
,
nlon_out
:
int
):
"""
Reference implementation of the custom contraction as described in [1]. This requires repeated
shifting of the input tensor, which can potentially be costly. For an efficient implementation
on GPU, make sure to use the custom kernel written in CUDA.
"""
assert
len
(
psi
.
shape
)
==
3
assert
len
(
psi
.
shape
)
==
3
assert
len
(
x
.
shape
)
==
4
assert
len
(
x
.
shape
)
==
4
psi
=
psi
.
to
(
x
.
device
)
psi
=
psi
.
to
(
x
.
device
)
...
...
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