From 52c7ad7bb720eadab7431b6ee984d20412e20435 Mon Sep 17 00:00:00 2001 From: linhaifeng <1371675203@qq.com> Date: Mon, 15 Dec 2025 07:04:32 +0000 Subject: [PATCH] [BE] remove redudant items in unordered_set/unodered_map (#170055) remove redudant items in unordered_set/unodered_map Pull Request resolved: https://github.com/pytorch/pytorch/pull/170055 Approved by: https://github.com/cyyever, https://github.com/malfet --- c10/core/DispatchKey.cpp | 1 - torch/csrc/jit/codegen/onednn/interface.cpp | 1 - torch/csrc/jit/passes/lower_tuples.cpp | 1 - torch/csrc/jit/serialization/python_print.cpp | 2 -- 4 files changed, 5 deletions(-) diff --git a/c10/core/DispatchKey.cpp b/c10/core/DispatchKey.cpp index 7c239ecdded..6ccde711b74 100644 --- a/c10/core/DispatchKey.cpp +++ b/c10/core/DispatchKey.cpp @@ -275,7 +275,6 @@ c10::DispatchKey parseDispatchKey(const std::string& k) { {"Dense", c10::DispatchKey::Dense}, {"FPGA", c10::DispatchKey::FPGA}, {"MAIA", c10::DispatchKey::MAIA}, - {"MPS", c10::DispatchKey::MPS}, {"Vulkan", c10::DispatchKey::Vulkan}, {"Metal", c10::DispatchKey::Metal}, {"VE", c10::DispatchKey::VE}, diff --git a/torch/csrc/jit/codegen/onednn/interface.cpp b/torch/csrc/jit/codegen/onednn/interface.cpp index 459fd9684c4..b13c01b81c2 100644 --- a/torch/csrc/jit/codegen/onednn/interface.cpp +++ b/torch/csrc/jit/codegen/onednn/interface.cpp @@ -57,7 +57,6 @@ void fuseGraph(std::shared_ptr& g) { aten::leaky_relu_, aten::round_, aten::exp_, - aten::abs_, aten::hardswish_, aten::silu_}; return supportedOps.count(nodeToFunctionalize->kind()) != 0; diff --git a/torch/csrc/jit/passes/lower_tuples.cpp b/torch/csrc/jit/passes/lower_tuples.cpp index cfeb04f5f19..1745c432432 100644 --- a/torch/csrc/jit/passes/lower_tuples.cpp +++ b/torch/csrc/jit/passes/lower_tuples.cpp @@ -27,7 +27,6 @@ std::unordered_set supported_ops = { prim::Return, prim::PythonOp, aten::format, - prim::Uninitialized, aten::__getitem__}; // Flatten block inputs and insert a tuple construct in the block diff --git a/torch/csrc/jit/serialization/python_print.cpp b/torch/csrc/jit/serialization/python_print.cpp index bf7e5250487..c303292eda4 100644 --- a/torch/csrc/jit/serialization/python_print.cpp +++ b/torch/csrc/jit/serialization/python_print.cpp @@ -57,7 +57,6 @@ const static std::unordered_set reserved_names = { "__torch__", // the python keywords "and", - "as", "assert", "async", "await", @@ -90,7 +89,6 @@ const static std::unordered_set reserved_names = { "try", "with", "while", - "with", "yield", "uninitialized", "unchecked_cast",