From 7a5fd0c9fa0c5b5a2b7c89267a98aa3194e563dd Mon Sep 17 00:00:00 2001 From: Tim Moon <4406448+timmoon10@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:52:31 -0700 Subject: [PATCH] [Paddle] Update type names for Paddle 3.0 (#1286) Update class names for Paddle 3.0 Signed-off-by: Tim Moon --- transformer_engine/paddle/csrc/custom_ops.cu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/transformer_engine/paddle/csrc/custom_ops.cu b/transformer_engine/paddle/csrc/custom_ops.cu index 904d979b8e..583cd0f47a 100644 --- a/transformer_engine/paddle/csrc/custom_ops.cu +++ b/transformer_engine/paddle/csrc/custom_ops.cu @@ -603,14 +603,14 @@ void UpdateRandomGenerator(phi::Place place, cudaStream_t stream, int rng_elts_p auto state_index = gen_cuda->GetStateIndex(); auto parameterSetter = [gen_cuda, state_index, - rng_elts_per_thread](phi::backends::gpu::CUDAKernelParams ¶ms) { + rng_elts_per_thread](phi::backends::gpu::gpuKernelParams ¶ms) { // ensure the generator use correct state index gen_cuda->SetStateIndex(state_index); auto seed_offset = gen_cuda->IncrementOffset(rng_elts_per_thread); params.As>(1) = seed_offset; }; - phi::backends::gpu::CUDAGraphNodeLauncher::cudaKernelCallback_t cudaKernelCallback = + phi::backends::gpu::CUDAGraphNodeLauncher::gpuKernelCallback_t cudaKernelCallback = [=](unsigned int id) { void *functionPtr = reinterpret_cast(&set_rng_state); cudaFunction_t cudaFunc; @@ -1016,14 +1016,14 @@ void te_fused_attn_fwd(const paddle::Tensor &Q, const paddle::Tensor &K, const p #if PADDLE_VERSION > 261 auto state_index = gen_cuda->GetStateIndex(); auto parameterSetter = [gen_cuda, state_index, - rng_elts_per_thread](phi::backends::gpu::CUDAKernelParams ¶ms) { + rng_elts_per_thread](phi::backends::gpu::gpuKernelParams ¶ms) { // ensure the generator use correct state index gen_cuda->SetStateIndex(state_index); auto seed_offset = gen_cuda->IncrementOffset(rng_elts_per_thread); params.As>(1) = seed_offset; }; - phi::backends::gpu::CUDAGraphNodeLauncher::cudaKernelCallback_t cudaKernelCallback = + phi::backends::gpu::CUDAGraphNodeLauncher::gpuKernelCallback_t cudaKernelCallback = [=](unsigned int id) { void *functionPtr = reinterpret_cast(&set_rng_state); cudaFunction_t cudaFunc; @@ -1383,7 +1383,7 @@ void amax_and_scale_update_inplace_legacy( const int *current_step_id_ptr = reinterpret_cast(GetOptionalDataPtr(current_step_id_tensor)); auto parameterSetter = [current_step_id_ptr, - fwd_update](phi::backends::gpu::CUDAKernelParams ¶ms) { + fwd_update](phi::backends::gpu::gpuKernelParams ¶ms) { if (fwd_update) { int current_step_id = *current_step_id_ptr; params.As(7) = (current_step_id == 0); @@ -1397,7 +1397,7 @@ void amax_and_scale_update_inplace_legacy( float *scale_ptr = scale.data(); float *scale_inv_ptr = scale_inv.data(); - phi::backends::gpu::CUDAGraphNodeLauncher::cudaKernelCallback_t cudaKernelCallback = + phi::backends::gpu::CUDAGraphNodeLauncher::gpuKernelCallback_t cudaKernelCallback = [=](unsigned int id) { void *functionPtr = reinterpret_cast(&UpdateFP8MetaKernel); cudaFunction_t cudaFunc;