File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed
Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments