Skip to content

Commit

Permalink
Convert tests to CPU to not perform scalar operations
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Sep 14, 2023
1 parent b567ecd commit a4baeb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NDTensors/test/combiner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ end
@test output_tensor isa DenseTensor
@test dims(output_tensor) == output_tensor_inds
for i in 1:length(input_tensor)
@test input_tensor[i] == output_tensor[i]
@test NDTensors.cpu(input_tensor)[i] == NDTensors.cpu(output_tensor)[i]
end

# Test uncombining
new_input_tensor = contract(output_tensor, (1, -1), combiner_tensor, (-1, 2, 3))
@test new_input_tensor == input_tensor
@test NDTensors.cpu(new_input_tensor) == NDTensors.cpu(input_tensor)

# Catch invalid combining
input_tensor_inds = (d,)
Expand Down

0 comments on commit a4baeb7

Please sign in to comment.