Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: refactor CSE to allow running greedy ML heuristic in release #98729

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,7 @@ class Compiler
friend class CSE_HeuristicRandom;
friend class CSE_HeuristicReplay;
friend class CSE_HeuristicRL;
friend class CSE_HeuristicParameterized;
friend class CSE_Heuristic;
friend class CodeGenInterface;
friend class CodeGen;
Expand Down
17 changes: 9 additions & 8 deletions src/coreclr/jit/jitconfigvalues.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,14 @@ CONFIG_INTEGER(JitConstCSE, W("JitConstCSE"), 0)
#define CONST_CSE_ENABLE_ALL 3
#define CONST_CSE_ENABLE_ALL_NO_SHARING 4

// If nonzero, use the greedy RL policy.
//
CONFIG_INTEGER(JitRLCSEGreedy, W("JitRLCSEGreedy"), 0)

// If nonzero, dump out details of parameterized policy evaluation and
// gradient updates
CONFIG_INTEGER(JitRLCSEVerbose, W("JitRLCSEVerbose"), 0)

#if defined(DEBUG)
// Allow fine-grained controls of CSEs done in a particular method
//
Expand Down Expand Up @@ -415,7 +423,7 @@ CONFIG_STRING(JitReplayCSE, W("JitReplayCSE"))
CONFIG_STRING(JitReplayCSEReward, W("JitReplayCSEReward"))

// When set, specifies the initial parameter string for
// a reinforcement-learning based CSE heuristic.
// the reinforcement-learning based CSE heuristic.
//
// Note you can also set JitReplayCSE and JitReplayCSEPerfScore
// along with this, in which case we are asking for a policy
Expand All @@ -426,16 +434,9 @@ CONFIG_STRING(JitRLCSE, W("JitRLCSE"))
// use in learning.
CONFIG_STRING(JitRLCSEAlpha, W("JitRLCSEAlpha"))

// If nonzero, dump out details of policy evaluation and
// gradient updates
CONFIG_INTEGER(JitRLCSEVerbose, W("JitRLCSEVerbose"), 0)

// If nonzero, dump candidate feature values
CONFIG_INTEGER(JitRLCSECandidateFeatures, W("JitRLCSECandidateFeatures"), 0)

// If nonzero, use the greedy policy with current parameters.
CONFIG_INTEGER(JitRLCSEGreedy, W("JitRLCSEGreedy"), 0)

#endif

///
Expand Down
Loading
Loading