diff --git a/paddle/fluid/platform/device/gpu/cuda/cuda_graph.h b/paddle/fluid/platform/device/gpu/cuda/cuda_graph.h index 8f84f26adbdbccbecb72139b2e1be4d091037e54..083478ed7e65996fabf171217e5f6ad9ded9b603 100644 --- a/paddle/fluid/platform/device/gpu/cuda/cuda_graph.h +++ b/paddle/fluid/platform/device/gpu/cuda/cuda_graph.h @@ -60,17 +60,18 @@ template struct IsSameKernelHelper { private: + using FuncArgsTuple = decltype(std::make_tuple(std::declval()...)); + template struct Impl { static bool Compare(const CUDAKernelParams ¶ms, const TupleT &args) { - using CompareT = typename std::tuple_element::type; + using CompareT = typename std::tuple_element::type; if (!IsBitwiseEqual(params.As(IDX), std::get(args))) { return false; } - constexpr auto NewIsEnd = - (IDX + 1 == sizeof(std::tuple_size::value)); + constexpr auto NewIsEnd = (IDX + 1 == std::tuple_size::value); return Impl::Compare(params, args); } }; @@ -83,8 +84,6 @@ struct IsSameKernelHelper { }; public: - using FuncArgsTuple = decltype(std::make_tuple(std::declval()...)); - template static bool Compare(const CUDAKernelParams ¶ms, Args... args) { constexpr auto kNumArgs = sizeof...(FuncArgs);