Skip to content

Commit

Permalink
device type
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Isaacson committed Jul 30, 2024
1 parent 13124ac commit 9c1aecb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/beignet/func/_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,10 @@ def _particles_per_cell(

size, unit_size, per_side, n = _cell_dimensions(dim, size, minimum_size)

hash_multipliers = _hash_constants(dim, per_side)
hash_multipliers = _hash_constants(dim, per_side).to(device=device)

positions = positions.to(device=device)
unit_size = unit_size.to(device=device)

particle_index = torch.tensor(positions / unit_size, dtype=torch.int32, device=device)

Expand Down

0 comments on commit 9c1aecb

Please sign in to comment.