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 9c1aecb commit 1d2e4e3
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 @@ -1180,8 +1180,11 @@ def fn(
device=parameter.device,
)

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

hashes = torch.sum(
(positions / unit_size).to(dtype=torch.int32)
(positions / unit_size).to(dtype=torch.int32, device=device)
* _hash_constants(spatial_dimension, units_per_side).to(
device=positions.device
),
Expand Down

0 comments on commit 1d2e4e3

Please sign in to comment.