diff --git a/paddle/phi/CMakeLists.txt b/paddle/phi/CMakeLists.txt index 46ecbffff142ea..f78acce025c1e3 100644 --- a/paddle/phi/CMakeLists.txt +++ b/paddle/phi/CMakeLists.txt @@ -25,8 +25,6 @@ add_subdirectory(backends) add_subdirectory(kernels) # phi infermeta add_subdirectory(infermeta) -# phi tools -add_subdirectory(tools) # phi capi if(WITH_CUSTOM_DEVICE) add_subdirectory(capi) diff --git a/paddle/phi/backends/dynload/cublas.cc b/paddle/phi/backends/dynload/cublas.cc index b870a90cb091c6..37a6f4b0d41eb5 100644 --- a/paddle/phi/backends/dynload/cublas.cc +++ b/paddle/phi/backends/dynload/cublas.cc @@ -33,4 +33,8 @@ CUBLAS_BLAS_ROUTINE_EACH_R3(DEFINE_WRAP); #ifdef CUBLAS_BLAS_ROUTINE_EACH_R4 CUBLAS_BLAS_ROUTINE_EACH_R4(DEFINE_WRAP); #endif + +#ifdef CUBLAS_BLAS_ROUTINE_EACH_R5 +CUBLAS_BLAS_ROUTINE_EACH_R5(DEFINE_WRAP); +#endif } // namespace phi::dynload diff --git a/paddle/phi/kernels/funcs/dropout_impl.cu.h b/paddle/phi/kernels/funcs/dropout_impl.cu.h index 855b6fe6c8e15c..553e1b07b5f5fe 100644 --- a/paddle/phi/kernels/funcs/dropout_impl.cu.h +++ b/paddle/phi/kernels/funcs/dropout_impl.cu.h @@ -357,11 +357,8 @@ void DropoutFwGPUKernelDriver( parameterSetter = [offset, dev_ctx_p, state_index, is_fix_seed]( phi::backends::gpu::gpuKernelParams& params) { if (!is_fix_seed) { - // we assume seed is null pointer - // seed copy to cpu is meaningless here -#ifndef PADDLE_WITH_HIP - assert(seed_tensor_ptr == nullptr); -#endif + // we assume seed is null pointer + // seed copy to cpu is meaningless here auto gen_cuda = dev_ctx_p->GetGenerator(); // ensure the generator use correct state index gen_cuda->SetStateIndex(state_index); diff --git a/paddle/phi/tools/CMakeLists.txt b/paddle/phi/tools/CMakeLists.txt deleted file mode 100644 index 3b9f3de671ba20..00000000000000 --- a/paddle/phi/tools/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -if(WITH_GPU) - if(${CMAKE_CUDA_COMPILER_VERSION} LESS 12.0 AND ${CMAKE_CXX_COMPILER_VERSION} - VERSION_GREATER 12.0) - return() - endif() -endif() - -add_executable(print_phi_kernels print_phi_kernels.cc) -target_link_libraries(print_phi_kernels phi common) -if(WIN32) - target_link_libraries(print_phi_kernels shlwapi.lib) - # In windows, some operators need to link pir, such as fused_attention - target_link_libraries(print_phi_kernels pir) -endif() -if(WITH_ROCM) - target_link_libraries(print_phi_kernels ${ROCM_HIPRTC_LIB}) -endif() diff --git a/paddle/phi/tools/print_phi_kernels.cc b/paddle/phi/tools/print_phi_kernels.cc deleted file mode 100644 index 0b79528139d0f6..00000000000000 --- a/paddle/phi/tools/print_phi_kernels.cc +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#include -#include - -#include "paddle/phi/core/kernel_factory.h" -#include "paddle/phi/core/kernel_registry.h" -#include "paddle/phi/kernels/declarations.h" - -int main(int argc UNUSED, char** argv UNUSED) { - std::cout << phi::KernelFactory::Instance() << std::endl; - return 0; -}