#include "caffe2/core/context_gpu.h" #include "caffe2/operators/gather_op.h" #include "caffe2/operators/gather_op.cuh" namespace caffe2 { template <> bool GatherOp::RunOnDevice() { return DispatchHelper>::call( this, OperatorBase::Input(INDICES, CUDA)); } template <> template bool GatherOp::DoRunWithType() { // Use shared implementation with BatchGather return gather_helper::gather_impl_cuda( this, DATA, INDICES, 0, axis_, wrap_indices_); } REGISTER_CUDA_OPERATOR(Gather, GatherOp); } // namespace caffe2