From b2d65b447f764928499f3c86999fff23d6e68ba2 Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Wed, 11 Dec 2019 11:15:12 -0800 Subject: [PATCH] Remove unnecessary parameter in some places in GatherElements implementation (#2612) * Remove unnecessary parameter in some places * Update * Update --- onnxruntime/core/providers/cuda/tensor/gather_elements.cc | 3 --- onnxruntime/core/providers/cuda/tensor/gather_elements_impl.cu | 3 --- onnxruntime/core/providers/cuda/tensor/gather_elements_impl.h | 1 - 3 files changed, 7 deletions(-) diff --git a/onnxruntime/core/providers/cuda/tensor/gather_elements.cc b/onnxruntime/core/providers/cuda/tensor/gather_elements.cc index 4fa8185f2e..1a2edb43b9 100644 --- a/onnxruntime/core/providers/cuda/tensor/gather_elements.cc +++ b/onnxruntime/core/providers/cuda/tensor/gather_elements.cc @@ -27,7 +27,6 @@ Status GatherElements::ComputeInternal(OpKernelContext* context) const { const auto& input_shape = input_tensor->Shape(); const auto& input_dims = input_shape.GetDims(); const int64_t input_rank = static_cast(input_dims.size()); - const int64_t input_size = input_shape.Size(); // Process indices tensor const auto* indices_tensor = context->Input(1); @@ -67,7 +66,6 @@ Status GatherElements::ComputeInternal(OpKernelContext* context) const { GatherElementsImpl( input_rank, input_tensor->DataRaw(), - input_size, input_dims[axis], gpu_input_strides.GpuPtr(), indices_data, @@ -82,7 +80,6 @@ Status GatherElements::ComputeInternal(OpKernelContext* context) const { GatherElementsImpl( input_rank, input_tensor->DataRaw(), - input_size, input_dims[axis], gpu_input_strides.GpuPtr(), indices_data, diff --git a/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.cu b/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.cu index a0ec64735e..b9d989c413 100644 --- a/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.cu +++ b/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.cu @@ -42,7 +42,6 @@ template void GatherElementsImpl( const int64_t rank, const void* input_data, - const int64_t input_size, const int64_t input_dim_along_axis, const int64_t* input_strides, const Tin* indices_data, @@ -95,7 +94,6 @@ void GatherElementsImpl( template void GatherElementsImpl( const int64_t rank, const void* input_data, - const int64_t input_size, const int64_t input_dim_along_axis, const int64_t* input_strides, const int32_t* indices_data, @@ -108,7 +106,6 @@ template void GatherElementsImpl( template void GatherElementsImpl( const int64_t rank, const void* input_data, - const int64_t input_size, const int64_t input_dim_along_axis, const int64_t* input_strides, const int64_t* indices_data, diff --git a/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.h b/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.h index aba9ef044e..e856f0f259 100644 --- a/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.h +++ b/onnxruntime/core/providers/cuda/tensor/gather_elements_impl.h @@ -13,7 +13,6 @@ template void GatherElementsImpl( const int64_t rank, // both inputs have same rank and this is validated in the main Compute const void* input_data, - const int64_t input_size, const int64_t input_dim_along_axis, const int64_t* input_strides, const Tin* indices_data,