未验证 提交 2d6d6fa1 编写于 作者: L Leo Chen 提交者: GitHub

delete FLAGS_run_pten_kernel (#39330)

上级 aecf9967
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h" #include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#endif #endif
DECLARE_bool(check_nan_inf); DECLARE_bool(check_nan_inf);
DECLARE_bool(run_pten_kernel);
namespace egr { namespace egr {
namespace legacy { namespace legacy {
......
...@@ -36,11 +36,6 @@ ...@@ -36,11 +36,6 @@
using namespace egr; // NOLINT using namespace egr; // NOLINT
using namespace egr_utils_api; // NOLINT using namespace egr_utils_api; // NOLINT
// Disable pten path
DECLARE_bool(run_pten_kernel);
TEST(Benchmark, Init) { FLAGS_run_pten_kernel = false; }
TEST(Benchmark, EagerScaleCPU) { TEST(Benchmark, EagerScaleCPU) {
// Prepare Device Contexts // Prepare Device Contexts
eager_test::InitEnv(paddle::platform::CPUPlace()); eager_test::InitEnv(paddle::platform::CPUPlace());
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
using namespace egr; // NOLINT using namespace egr; // NOLINT
using namespace egr_utils_api; // NOLINT using namespace egr_utils_api; // NOLINT
DECLARE_bool(run_pten_kernel);
TEST(Benchmark, Init) { FLAGS_run_pten_kernel = false; }
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
TEST(Benchmark, EagerScaleCUDA) { TEST(Benchmark, EagerScaleCUDA) {
......
...@@ -34,11 +34,6 @@ ...@@ -34,11 +34,6 @@
#include "gperftools/profiler.h" #include "gperftools/profiler.h"
#endif #endif
// Disable pten path
DECLARE_bool(run_pten_kernel);
TEST(Benchmark, Init) { FLAGS_run_pten_kernel = false; }
namespace paddle { namespace paddle {
namespace imperative { namespace imperative {
......
...@@ -34,11 +34,6 @@ ...@@ -34,11 +34,6 @@
#include "gperftools/profiler.h" #include "gperftools/profiler.h"
#endif #endif
// Disable pten path
DECLARE_bool(run_pten_kernel);
TEST(Benchmark, Init) { FLAGS_run_pten_kernel = false; }
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
namespace paddle { namespace paddle {
......
...@@ -29,8 +29,6 @@ limitations under the License. */ ...@@ -29,8 +29,6 @@ limitations under the License. */
#include "paddle/pten/core/kernel_context.h" #include "paddle/pten/core/kernel_context.h"
#include "paddle/pten/core/kernel_registry.h" #include "paddle/pten/core/kernel_registry.h"
DECLARE_bool(run_pten_kernel);
namespace paddle { namespace paddle {
namespace framework { namespace framework {
...@@ -279,10 +277,6 @@ static void RunKernelFunc(pten::KernelContext* ctx, ...@@ -279,10 +277,6 @@ static void RunKernelFunc(pten::KernelContext* ctx,
void RegisterKernelWithMetaInfo( void RegisterKernelWithMetaInfo(
const std::vector<OpKernelInfo>& op_kernel_infos) { const std::vector<OpKernelInfo>& op_kernel_infos) {
PADDLE_ENFORCE_EQ(FLAGS_run_pten_kernel, true,
platform::errors::Unimplemented(
"Custom Kernel depends on pten kernel enabled,"));
for (size_t i = 0; i < op_kernel_infos.size(); ++i) { for (size_t i = 0; i < op_kernel_infos.size(); ++i) {
auto& kernel_info = op_kernel_infos[i]; auto& kernel_info = op_kernel_infos[i];
auto op_type = OpKernelInfoHelper::GetOpName(kernel_info); auto op_type = OpKernelInfoHelper::GetOpName(kernel_info);
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
PADDLE_DEFINE_EXPORTED_bool( PADDLE_DEFINE_EXPORTED_bool(
new_executor_sequential_run, false, new_executor_sequential_run, false,
"Enable sequential execution for standalone executor, used for debug"); "Enable sequential execution for standalone executor, used for debug");
DECLARE_bool(run_pten_kernel);
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -56,7 +56,6 @@ DECLARE_bool(check_nan_inf); ...@@ -56,7 +56,6 @@ DECLARE_bool(check_nan_inf);
DECLARE_bool(enable_unused_var_check); DECLARE_bool(enable_unused_var_check);
PADDLE_DEFINE_EXPORTED_int32(inner_op_parallelism, 0, PADDLE_DEFINE_EXPORTED_int32(inner_op_parallelism, 0,
"number of threads for inner op"); "number of threads for inner op");
DECLARE_bool(run_pten_kernel);
DECLARE_bool(run_kp_kernel); DECLARE_bool(run_kp_kernel);
namespace paddle { namespace paddle {
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "paddle/fluid/platform/profiler.h" #include "paddle/fluid/platform/profiler.h"
DECLARE_bool(check_nan_inf); DECLARE_bool(check_nan_inf);
DECLARE_bool(run_pten_kernel);
DECLARE_bool(benchmark); DECLARE_bool(benchmark);
DECLARE_bool(run_kp_kernel); DECLARE_bool(run_kp_kernel);
......
...@@ -687,18 +687,6 @@ PADDLE_DEFINE_EXPORTED_bool( ...@@ -687,18 +687,6 @@ PADDLE_DEFINE_EXPORTED_bool(
apply_pass_to_program, false, apply_pass_to_program, false,
"It controls whether to apply IR pass to program when using Fleet APIs"); "It controls whether to apply IR pass to program when using Fleet APIs");
/**
* Pt kernel related FLAG
* Name: FLAGS_run_pten_kernel
* Since Version: 2.3.0
* Value Range: bool, default=false
* Example: FLAGS_run_pten_kernel=true would use the pt kernel to compute in the
* Op.
* Note:
*/
PADDLE_DEFINE_EXPORTED_bool(run_pten_kernel, true,
"It controls whether to use pten kernel");
/** /**
* KP kernel related FLAG * KP kernel related FLAG
* Name: FLAGS_run_kp_kernel * Name: FLAGS_run_kp_kernel
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册