Searching in torch/cuda