Fix unused variable warning (#72412)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72412
Fixes:
```
caffe2/aten/src/ATen/cuda/CUDAApplyUtils.cuh(328): warning: parameter "n" was declared but never referenced
detected during:
instantiation of "void at::cuda::<unnamed>::ApplyOp2<Op, scalar1, scalar2, IndexType, ADims, BDims, remaining_steps, Offsets...>::apply(at::cuda::detail::TensorInfo<scalar1, IndexType> &, at::cuda::detail::TensorInfo<scalar2, IndexType> &, const Op &, int64_t, IndexType, Offsets..., Offsets...) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, remaining_steps=1, Offsets=<>]"
(370): here
instantiation of "void at::cuda::<unnamed>::kernelPointwiseApply2<Op,scalar1,scalar2,IndexType,ADims,BDims,step,max_threads_per_block,min_blocks_per_sm>(at::cuda::detail::TensorInfo<scalar1, IndexType>, at::cuda::detail::TensorInfo<scalar2, IndexType>, IndexType, Op) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, step=1, max_threads_per_block=512, min_blocks_per_sm=2]"
(487): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,step,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, step=1, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
(533): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(60): here
instantiation of "void <unnamed>::poisson_cuda_kernel<scalar_t>(at::Tensor &, const at::Tensor &, at::PhiloxCudaState) [with scalar_t=double]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(169): here
caffe2/aten/src/ATen/cuda/CUDAApplyUtils.cuh(328): warning: parameter "linearIndex" was declared but never referenced
detected during:
instantiation of "void at::cuda::<unnamed>::ApplyOp2<Op, scalar1, scalar2, IndexType, ADims, BDims, remaining_steps, Offsets...>::apply(at::cuda::detail::TensorInfo<scalar1, IndexType> &, at::cuda::detail::TensorInfo<scalar2, IndexType> &, const Op &, int64_t, IndexType, Offsets..., Offsets...) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, remaining_steps=1, Offsets=<>]"
(370): here
instantiation of "void at::cuda::<unnamed>::kernelPointwiseApply2<Op,scalar1,scalar2,IndexType,ADims,BDims,step,max_threads_per_block,min_blocks_per_sm>(at::cuda::detail::TensorInfo<scalar1, IndexType>, at::cuda::detail::TensorInfo<scalar2, IndexType>, IndexType, Op) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, step=1, max_threads_per_block=512, min_blocks_per_sm=2]"
(487): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,step,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, step=1, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
(533): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(60): here
instantiation of "void <unnamed>::poisson_cuda_kernel<scalar_t>(at::Tensor &, const at::Tensor &, at::PhiloxCudaState) [with scalar_t=double]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(169): here
caffe2/aten/src/ATen/cuda/CUDAApplyUtils.cuh(328): warning: parameter "linearIndex" was declared but never referenced
detected during:
instantiation of "void at::cuda::<unnamed>::ApplyOp2<Op, scalar1, scalar2, IndexType, ADims, BDims, remaining_steps, Offsets...>::apply(at::cuda::detail::TensorInfo<scalar1, IndexType> &, at::cuda::detail::TensorInfo<scalar2, IndexType> &, const Op &, int64_t, IndexType, Offsets..., Offsets...) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, remaining_steps=1, Offsets=<>]"
(370): here
instantiation of "void at::cuda::<unnamed>::kernelPointwiseApply2<Op,scalar1,scalar2,IndexType,ADims,BDims,step,max_threads_per_block,min_blocks_per_sm>(at::cuda::detail::TensorInfo<scalar1, IndexType>, at::cuda::detail::TensorInfo<scalar2, IndexType>, IndexType, Op) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, step=1, max_threads_per_block=512, min_blocks_per_sm=2]"
(487): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,step,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, step=1, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
(533): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(60): here
instantiation of "void <unnamed>::poisson_cuda_kernel<scalar_t>(at::Tensor &, const at::Tensor &, at::PhiloxCudaState) [with scalar_t=double]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(169): here
caffe2/aten/src/ATen/cuda/CUDAApplyUtils.cuh(328): warning: parameter "n" was declared but never referenced
detected during:
instantiation of "void at::cuda::<unnamed>::ApplyOp2<Op, scalar1, scalar2, IndexType, ADims, BDims, remaining_steps, Offsets...>::apply(at::cuda::detail::TensorInfo<scalar1, IndexType> &, at::cuda::detail::TensorInfo<scalar2, IndexType> &, const Op &, int64_t, IndexType, Offsets..., Offsets...) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, remaining_steps=1, Offsets=<>]"
(370): here
instantiation of "void at::cuda::<unnamed>::kernelPointwiseApply2<Op,scalar1,scalar2,IndexType,ADims,BDims,step,max_threads_per_block,min_blocks_per_sm>(at::cuda::detail::TensorInfo<scalar1, IndexType>, at::cuda::detail::TensorInfo<scalar2, IndexType>, IndexType, Op) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, step=1, max_threads_per_block=512, min_blocks_per_sm=2]"
(487): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,step,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, step=1, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
(533): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(60): here
instantiation of "void <unnamed>::poisson_cuda_kernel<scalar_t>(at::Tensor &, const at::Tensor &, at::PhiloxCudaState) [with scalar_t=double]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(169): here
caffe2/aten/src/ATen/cuda/CUDAApplyUtils.cuh(328): warning: parameter "linearIndex" was declared but never referenced
detected during:
instantiation of "void at::cuda::<unnamed>::ApplyOp2<Op, scalar1, scalar2, IndexType, ADims, BDims, remaining_steps, Offsets...>::apply(at::cuda::detail::TensorInfo<scalar1, IndexType> &, at::cuda::detail::TensorInfo<scalar2, IndexType> &, const Op &, int64_t, IndexType, Offsets..., Offsets...) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, remaining_steps=1, Offsets=<>]"
(370): here
instantiation of "void at::cuda::<unnamed>::kernelPointwiseApply2<Op,scalar1,scalar2,IndexType,ADims,BDims,step,max_threads_per_block,min_blocks_per_sm>(at::cuda::detail::TensorInfo<scalar1, IndexType>, at::cuda::detail::TensorInfo<scalar2, IndexType>, IndexType, Op) [with Op=lambda [](double &, const double &)->void, scalar1=double, scalar2=double, IndexType=unsigned int, ADims=1, BDims=1, step=1, max_threads_per_block=512, min_blocks_per_sm=2]"
(487): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,step,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, step=1, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
(533): here
instantiation of "__nv_bool at::cuda::CUDA_tensor_apply2<scalar1,scalar2,Op,max_threads_per_block,min_blocks_per_sm>(at::Tensor, at::Tensor, Op, at::cuda::TensorArgType, at::cuda::TensorArgType) [with scalar1=double, scalar2=double, Op=lambda [](double &, const double &)->void, max_threads_per_block=512, min_blocks_per_sm=2]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(60): here
instantiation of "void <unnamed>::poisson_cuda_kernel<scalar_t>(at::Tensor &, const at::Tensor &, at::PhiloxCudaState) [with scalar_t=double]"
caffe2/aten/src/ATen/native/cuda/Distributions.cu(169): here
```
Test Plan: Sandcastle
Reviewed By: malfet
Differential Revision: D34034374
fbshipit-source-id: c92f0374eb5c821e1a67c2b8122c0791ed0809d4
(cherry picked from commit 66f5f96371da8f31048fe5d565b0b00c164bacc9)