Skip to content

Commit

Permalink
add cpp flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber-pioneer committed Jan 2, 2024
1 parent 707caea commit 570110c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions paddle/fluid/prim/utils/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
#include "paddle/fluid/prim/utils/static/static_global_utils.h"

PADDLE_DEFINE_EXPORTED_bool(prim_enabled, false, "enable_prim or not");
PADDLE_DEFINE_EXPORTED_string(prim_blacklist, "", "prim ops blacklist");

namespace paddle {
namespace prim {

bool PrimCommonUtils::IsBwdPrimEnabled() {
return StaticCompositeContext::Instance().IsBwdPrimEnabled();
}
Expand All @@ -40,10 +43,12 @@ bool PrimCommonUtils::IsFwdPrimEnabled() {
}

void PrimCommonUtils::SetFwdPrimEnabled(bool enable_prim) {
VLOG(0) << "FLAGS_prim_enabled ====================== " << FLAGS_prim_enabled;
StaticCompositeContext::Instance().SetFwdPrimEnabled(enable_prim);
}

void PrimCommonUtils::SetAllPrimEnabled(bool enable_prim) {
VLOG(0) << "FLAGS_prim_enabled ====================== " << FLAGS_prim_enabled;
StaticCompositeContext::Instance().SetAllPrimEnabled(enable_prim);
}

Expand Down

0 comments on commit 570110c

Please sign in to comment.