Revert "[LT] Store OpKind for each IR subclass in a static field"

This reverts commit ac37ddc79557d7a5ec184a7d2924241ccfc8a333.

Reverted https://github.com/pytorch/pytorch/pull/76711 on behalf of https://github.com/malfet
This commit is contained in:
PyTorch MergeBot
2022-05-09 20:50:09 +00:00
parent da565c07e1
commit 7eaf4780ba
56 changed files with 63 additions and 212 deletions

View File

@ -530,29 +530,6 @@ def run_gen_lazy_tensor(
"namespace_epilogue": ns_helper.epilogue,
},
)
# Generate OpKind definitions for IR node classes
fm.write_with_template(
"LazyIr.cpp",
"LazyIr.cpp",
lambda: {
"includes": [
f"#include <{path}>"
for path in [
f"{output_dir}/LazyIr.h",
]
],
"opkind_definitions": list(
concat_map_codegen(
lazy_ir_generator(
backend_indices[backend_key], node_base
).gen_opkind_definition,
grouped_native_functions,
)
),
"namespace_prologue": ns_helper.prologue,
"namespace_epilogue": ns_helper.epilogue,
},
)
if __name__ == "__main__":