Skip to content

Commit

Permalink
minor fix in gp2Scale on GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Sep 14, 2023
1 parent 94db5ed commit 06dabd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fvgp/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2366,10 +2366,10 @@ def wendland_anisotropic_gp2Scale_gpu(x1,x2, hps, obj):
x1_dev = torch.from_numpy(x1).to(cuda_device, dtype = torch.float32)
x2_dev = torch.from_numpy(x2).to(cuda_device, dtype = torch.float32)
hps_dev = torch.from_numpy(hps).to(cuda_device, dtype = torch.float32)
distance_matrix = _get_distance_matrix_gpu(x1_dev,x2_dev,cuda_device,hps_dev)
d = _get_distance_matrix_gpu(x1_dev,x2_dev,cuda_device,hps_dev)
d[d > 1.] = 1.
kernel = hps[0] * (1.-d)**8 * (35.*d**3 + 25.*d**2 + 8.*d + 1.)
return kernel
return kernel.cpu().numpy()


def _get_distance_matrix_gpu(x1,x2,device,hps):
Expand Down

0 comments on commit 06dabd6

Please sign in to comment.