8000 GH-115457: Support splitting and replication of micro ops. by markshannon · Pull Request #115558 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-115457: Support splitting and replication of micro ops. #115558

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

Merged
merged 6 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Do not emit abstract interpreter code for replica uops
  • Loading branch information
markshannon committed Feb 15, 2024
commit 97cf57e934c3b102a4167f3e7ff6747206180167
3 changes: 2 additions & 1 deletion Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ globals_watcher_callback(PyDict_WatchEvent event, PyObject* dict,
static void
global_to_const(_PyUOpInstruction *inst, PyObject *obj)
{
assert(inst->opcode == _LOAD_GLOBAL_MODULE || inst->opcode == _LOAD_GLOBAL_BUILTINS); assert(PyDict_CheckExact(obj));
assert(inst->opcode == _LOAD_GLOBAL_MODULE || inst->opcode == _LOAD_GLOBAL_BUILTINS);
assert(PyDict_CheckExact(obj));
PyDictObject *dict = (PyDictObject *)obj;
assert(dict->ma_keys->dk_kind == DICT_KEYS_UNICODE);
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
Expand Down
72 changes: 0 additions & 72 deletions Python/tier2_redundancy_eliminator_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Tools/cases_generator/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def make_uop(name: str, op: parser.InstDef, inputs: list[parser.InputEffect], uo
if properties.oparg:
# May not need oparg anymore
properties.oparg = any(token.text == "oparg" for token in op.block.tokens)
uops[name_x] = Uop(
rep = Uop(
name=name_x,
context=op.context,
annotations=op.annotations,
Expand All @@ -522,6 +522,8 @@ def make_uop(name: str, op: parser.InstDef, inputs: list[parser.InputEffect], uo
body=op.block.tokens,
properties=properties,
)
rep.replicates = result
uops[name_x] = rep
for anno in op.annotations:
if anno.startswith("replicate"):
result.replicated = int(anno[10:-1])
Expand Down
0