Skip to content

Commit

Permalink
Merge pull request #267 from Cambridge-ICCS/hotfix-cuda-device-index-…
Browse files Browse the repository at this point in the history
…test

Use `get_device_index` method in test
  • Loading branch information
jwallwork23 authored Jan 30, 2025
2 parents c21040d + b0d8ded commit 46dfa7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/unit/test_tensor_interrogation_cuda.pf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contains
call torch_tensor_empty(tensor, ndims, tensor_shape, dtype, device_type)

! Check that torch_tensor_get_device_index can get the device index
if (expected /= torch_tensor_get_device_index(tensor)) then
if (expected /= tensor%get_device_index()) then
call torch_tensor_delete(tensor)
print *, "Error :: torch_tensor_get_device_index returned incorrect CUDA device index"
stop 999
Expand Down

0 comments on commit 46dfa7e

Please sign in to comment.