Skip to content

Commit 429b093

Browse files
committed
remove excesive comments
1 parent 0876875 commit 429b093

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

more_math/Parser/TensorEvalVisitor.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,23 +185,9 @@ def visitSifftFunc(self, ctx):
185185
old_vars = self.variables
186186
# Switch to freq variables
187187
self.variables = self.variables.copy()
188-
189-
# Inject Freq variables based on shape
190-
# Dimensions being transformed are 2 onwards
191-
# We use a reference tensor from existing variables to get device/dtype if possible,
192-
# or use val from a visit? We need vars BEFORE visit.
193-
# We can construct index tensors using torch.arange like getIndexTensorAlongDim does.
194-
# We need the device. 'a' is a safe bet for device source.
195188
device = self.spatial_variables['a'].device if 'a' in self.spatial_variables else torch.device('cpu')
196-
197189
dims = range(2, len(self.shape))
198190
for d in dims:
199-
# Create index tensor for dim d
200-
# Shape: ones with size at dim d
201-
# getIndexTensorAlongDim logic:
202-
# shape = tensor.shape
203-
# values = torch.arange(shape[dim], ...)
204-
# reshape and expand
205191
size_d = self.shape[d]
206192
values = torch.arange(size_d, dtype=torch.float32, device=device)
207193
view_shape = [1] * len(self.shape)

0 commit comments

Comments
 (0)