Skip to content

Commit

Permalink
Fix 'backend' usage in DPLR kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfgu committed Feb 21, 2024
1 parent 35cc242 commit e757cef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/s4/s4.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,9 @@ def forward(self, state=None, rate=1.0, L=None):
v = v * dt # Incorporate dt into B

# Dispatch which Cauchy kernel to use
if has_cuda_extension and z.dtype == torch.cfloat and z.device.type == 'cuda' and self.kernel == 'cuda':
if has_cuda_extension and z.dtype == torch.cfloat and z.device.type == 'cuda' and self.backend == 'cuda':
cauchy_mult = cauchy_cuda
elif has_pykeops and self.kernel in ['cuda', 'keops']:
elif has_pykeops and self.backend in ['cuda', 'keops']:
cauchy_mult = cauchy_keops
else:
cauchy_mult = cauchy_naive
Expand Down

0 comments on commit e757cef

Please sign in to comment.