From eb8fc7595ff04213021bfb322d8ecf987681cf41 Mon Sep 17 00:00:00 2001 From: Qi Li Date: Fri, 1 Jul 2022 18:02:30 +0800 Subject: [PATCH] [DCU] fix compiling error on DTK22.04, test=develop (#43999) --- paddle/fluid/operators/class_center_sample_op.cu | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paddle/fluid/operators/class_center_sample_op.cu b/paddle/fluid/operators/class_center_sample_op.cu index 236f783017d..a0642694843 100644 --- a/paddle/fluid/operators/class_center_sample_op.cu +++ b/paddle/fluid/operators/class_center_sample_op.cu @@ -220,6 +220,12 @@ class NotEqualToPreviousAdjacentIterator { return ret; } + template + __host__ __device__ __forceinline__ self_type operator-(Distance n) const { + self_type ret(arr_, offset_ - n); + return ret; + } + template __host__ __device__ __forceinline__ reference operator[](Distance n) const { return *(*this + n); -- GitLab