Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#22 from mthreads/fix_profiler
Browse files Browse the repository at this point in the history
Replace PADDLE_WITH_MUSAAA with PADDLE_WITH_MUSA
  • Loading branch information
caizhi-mt authored and mt-robot committed Aug 4, 2023
2 parents e21c198 + 4445bc0 commit 8b0419a
Show file tree
Hide file tree
Showing 48 changed files with 86 additions and 53 deletions.
4 changes: 2 additions & 2 deletions cmake/generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ function(musa_library TARGET_NAME)
if(musa_library_SRCS)
# TODO(MTAI): enable compiling static library
if(musa_library_SHARED OR musa_library_shared) # build *.so
add_library(${TARGET_NAME} SHARED ${musa_library_SRCS})
musa_add_library(${TARGET_NAME} SHARED ${musa_library_SRCS})
else()
add_library(${TARGET_NAME} STATIC ${musa_library_SRCS})
musa_add_library(${TARGET_NAME} STATIC ${musa_library_SRCS})
find_fluid_modules(${TARGET_NAME})
find_phi_modules(${TARGET_NAME})
endif()
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/rank_loss_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ PD_REGISTER_STRUCT_KERNEL(
PD_REGISTER_STRUCT_KERNEL(
rank_loss_grad, CPU, ALL_LAYOUT, ops::RankLossGradKernel, float) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_STRUCT_KERNEL(
rank_loss, GPU, ALL_LAYOUT, ops::RankLossKernel, float) {}
PD_REGISTER_STRUCT_KERNEL(
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/reshape_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ REGISTER_OPERATOR(reshape2_grad_grad,
ops::ReshapeDoubleGradOpNoNeedBufferVarInferer,
Reshape2DoubleGradInferShapeFunctor);

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
REGISTER_OP_CUDA_KERNEL_FUNCTOR(reshape,
float,
ops::ReshapeKernel,
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/save_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ PD_REGISTER_KERNEL(save_sr,
phi::dtype::float16,
phi::dtype::bfloat16) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(save,
GPU,
ALL_LAYOUT,
Expand Down
11 changes: 11 additions & 0 deletions paddle/fluid/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@ elseif(WITH_ROCM)
stats
op_proto_maker
shape_inference)
elseif(WITH_MUSA)
musa_library(
profiler
SRCS profiler.cc profiler.cu
DEPS phi
gpu_info
enforce
new_profiler
stats
op_proto_maker
shape_inference)
elseif(WITH_XPU)
cc_library(
profiler
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ void EnableProfiler(ProfilerState state) {
HostTraceLevel::GetInstance().SetLevel(option.trace_level);
should_send_profile_state = true;
phi::GetDeviceTracer()->Enable();
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
if (phi::ProfilerHelper::g_state == ProfilerState::kCUDA ||
phi::ProfilerHelper::g_state == ProfilerState::kAll ||
phi::ProfilerHelper::g_state == ProfilerState::kCPU) {
Expand Down
5 changes: 5 additions & 0 deletions paddle/phi/kernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,16 @@ file(
"gpu/c*.cu"
"gpu/s*.cu"
"gpu/abs_kernel.cu"
"gpu/uniform_kernel.cu"
"gpu/activation_kernel.cu"
"gpu/full_kernel.cu"
"gpu/p_norm_grad_kernel.cu"
"gpu/matmul_kernel.cu"
"gpu/expand_kernel.cu"
"gpu/isfinite_kernel.cu"
"kps/*.cu"
"legacy/gpu/uniform_kernel.cu"
"sparse/gpu/mask_kernel.cu"
"legacy/kps/*.cu"
)
list(REMOVE_ITEM kernel_cu
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/activation_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using complex128 = ::phi::dtype::complex<double>;

PD_REGISTER_KERNEL(relu6, CPU, ALL_LAYOUT, phi::Relu6Kernel, float, double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(relu6,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/assign_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ PD_REGISTER_KERNEL(assign_value,
int8_t,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL_FOR_ALL_DTYPE(assign,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/check_memory_continue_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PD_REGISTER_KERNEL(check_memory_continue,
float,
double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(check_memory_continue,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/coalesce_tensor_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ PD_REGISTER_KERNEL(coalesce_tensor,
}
#endif

#if defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(coalesce_tensor,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/dist_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void DistGradKernel(const Context& dev_ctx,
PD_REGISTER_KERNEL(
dist_grad, CPU, ALL_LAYOUT, phi::DistGradKernel, float, double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(
dist_grad, GPU, ALL_LAYOUT, phi::DistGradKernel, float, double) {}
#endif
2 changes: 1 addition & 1 deletion paddle/phi/kernels/flatten_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PD_REGISTER_KERNEL(flatten_grad,
int,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(flatten_grad,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/flatten_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PD_REGISTER_KERNEL(flatten,
int,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(flatten_infer,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/full_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PD_REGISTER_KERNEL(full_batch_size_like,
bool) {
kernel->InputAt(0).SetBackend(phi::Backend::ALL_BACKEND);
}
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(full_batch_size_like,
GPU,
ALL_LAYOUT,
Expand Down
22 changes: 13 additions & 9 deletions paddle/phi/kernels/funcs/distribution_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ struct normal_distribution<double> {
#elif defined(__MUSACC__)
template <typename T>
struct uniform_distribution {
__device__ inline T operator()(murandStatePhilox4_32_10_t *state) const {
__device__ inline T operator()(murand_state_philox4x32_10 *state) const {
return static_cast<T>(murand_uniform(state));
}
static constexpr int kReturnsCount = 1;
};

template <>
struct uniform_distribution<float> {
__device__ inline float4 operator()(murandStatePhilox4_32_10_t *state) const {
__device__ inline float4 operator()(murand_state_philox4x32_10 *state) const {
return murand_uniform4(state);
}
static constexpr int kReturnsCount = 4;
Expand All @@ -209,15 +209,15 @@ struct uniform_distribution<float> {
template <>
struct uniform_distribution<double> {
__device__ inline double2 operator()(
murandStatePhilox4_32_10_t *state) const {
return murand_uniform2_double(state);
murand_state_philox4x32_10 *state) const {
return murand_uniform_double2(state);
}
static constexpr int kReturnsCount = 2;
};

template <>
struct uniform_distribution<uint32_t> {
__device__ inline uint4 operator()(murandStatePhilox4_32_10_t *state) const {
__device__ inline uint4 operator()(murand_state_philox4x32_10 *state) const {
return murand4(state);
}
static constexpr int kReturnsCount = 4;
Expand All @@ -226,7 +226,7 @@ struct uniform_distribution<uint32_t> {
template <>
struct uniform_distribution<uint64_t> {
__device__ inline ulonglong2 operator()(
murandStatePhilox4_32_10_t *state) const {
murand_state_philox4x32_10 *state) const {
ulonglong2 result;
uint4 rand = murand4(state);
result.x = (uint64_t)rand.x << 32 | rand.y;
Expand All @@ -238,7 +238,7 @@ struct uniform_distribution<uint64_t> {

template <>
struct normal_distribution<float> {
__device__ inline float4 operator()(murandStatePhilox4_32_10_t *state) const {
__device__ inline float4 operator()(murand_state_philox4x32_10 *state) const {
return murand_normal4(state);
}
static constexpr int kReturnsCount = 4;
Expand All @@ -247,8 +247,8 @@ struct normal_distribution<float> {
template <>
struct normal_distribution<double> {
__device__ inline double2 operator()(
murandStatePhilox4_32_10_t *state) const {
return murand_normal2_double(state);
murand_state_philox4x32_10 *state) const {
return murand_normal_double2(state);
}
static constexpr int kReturnsCount = 2;
};
Expand Down Expand Up @@ -334,6 +334,10 @@ __global__ void DistributionKernel(size_t size,
curandStatePhilox4_32_10_t state;
curand_init(seed, idx + THREAD_ID_X, offset, &state);
using SType = curandStatePhilox4_32_10_t;
#elif defined(__MUSACC__)
murand_state_philox4x32_10 state;
murand_init(seed, idx + THREAD_ID_X, offset, &state);
using SType = murand_state_philox4x32_10;
#else
hiprandStatePhilox4_32_10_t state;
hiprand_init(seed, idx + THREAD_ID_X, offset, &state);
Expand Down
4 changes: 4 additions & 0 deletions paddle/phi/kernels/funcs/sparse/softmax.cu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ inline DenseTensor GetOffsets(const Context& dev_ctx,
const IntT dim) {
#ifdef __HIPCC__
const auto& policy = thrust::hip::par.on(dev_ctx.stream());
#elif defined(__MUSACC__)
const auto& policy = thrust::musa::par.on(dev_ctx.stream());
#else
const auto& policy = thrust::cuda::par.on(dev_ctx.stream());
#endif
Expand Down Expand Up @@ -87,6 +89,8 @@ std::tuple<DenseTensor, DenseTensor, DenseTensor, DenseTensor> ComputePoolMax(
const IntT dim) {
#ifdef __HIPCC__
const auto& policy = thrust::hip::par.on(dev_ctx.stream());
#elif defined(__MUSACC__)
const auto& policy = thrust::musa::par.on(dev_ctx.stream());
#else
const auto& policy = thrust::cuda::par.on(dev_ctx.stream());
#endif
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/is_empty_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PD_REGISTER_KERNEL(is_empty,
kernel->OutputAt(0).SetDataType(phi::DataType::BOOL);
}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(is_empty,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/memcpy_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ PD_REGISTER_KERNEL_FOR_ALL_DTYPE(memcpy,
kernel->InputAt(0).SetBackend(phi::Backend::ALL_BACKEND);
}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL_FOR_ALL_DTYPE(memcpy_h2d,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/npu_identity_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ PD_REGISTER_KERNEL(npu_identity,
bool,
phi::dtype::float16) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(npu_identity,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/prod_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PD_REGISTER_KERNEL(prod_infer,
int,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(prod_infer,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/reduce_amax_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void AMaxKernel(const Context& dev_ctx,
PD_REGISTER_KERNEL(
amax, CPU, ALL_LAYOUT, phi::AMaxKernel, float, double, int, int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(
amax, GPU, ALL_LAYOUT, phi::AMaxKernel, float, double, int, int64_t) {}
#endif
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/reduce_amin_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void AMinKernel(const Context& dev_ctx,
PD_REGISTER_KERNEL(
amin, CPU, ALL_LAYOUT, phi::AMinKernel, float, double, int, int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(
amin, GPU, ALL_LAYOUT, phi::AMinKernel, float, double, int, int64_t) {}
#endif
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/reduce_mean_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PD_REGISTER_KERNEL(mean,
phi::dtype::complex<float>,
phi::dtype::complex<double>) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(mean,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/reduce_min_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PD_REGISTER_KERNEL(
min, GPU, ALL_LAYOUT, phi::MinKernel, float, double, int, int64_t) {}
#endif

#if defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(
min, GPU, ALL_LAYOUT, phi::MinKernel, float, double, int, int64_t, phi::dtype::float16) {}
#endif
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/reverse_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PD_REGISTER_KERNEL(reverse_array,
float,
double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)

PD_REGISTER_KERNEL(reverse_array,
GPU,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/activation_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PD_REGISTER_KERNEL(
PD_REGISTER_KERNEL(
sqrt_sr, CPU, ALL_LAYOUT, phi::sr::SqrtKernel, float, double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)

PD_REGISTER_KERNEL(square_sr,
GPU,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/assign_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PD_REGISTER_KERNEL_FOR_ALL_DTYPE(assign_sr,
kernel->InputAt(0).SetBackend(phi::Backend::ALL_BACKEND);
}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL_FOR_ALL_DTYPE(assign_sr,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/full_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PD_REGISTER_KERNEL(full_sr,
phi::dtype::complex<float>,
phi::dtype::complex<double>) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(full_sr,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/isfinite_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PD_REGISTER_KERNEL(isfinite_sr,
int,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(isinf_sr,
GPU,
ALL_LAYOUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PD_REGISTER_KERNEL(merge_selected_rows,
float,
double) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(merge_selected_rows,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/scale_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PD_REGISTER_KERNEL(scale_sr,
int,
int64_t) {}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(scale_sr,
GPU,
ALL_LAYOUT,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/selected_rows/shape_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PD_REGISTER_KERNEL(shape_sr,
kernel->OutputAt(0).SetDataType(phi::DataType::INT32);
}

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSAAA)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) || defined(PADDLE_WITH_MUSA)
PD_REGISTER_KERNEL(shape_sr,
GPU,
ALL_LAYOUT,
Expand Down
Loading

0 comments on commit 8b0419a

Please sign in to comment.