From 4acb4125a9b55bd79b576fa248483cab4d3b8698 Mon Sep 17 00:00:00 2001 From: Songhao Jia Date: Thu, 27 Feb 2025 11:11:03 -0800 Subject: [PATCH] Remove no longer used `is_not_dype_exception` function (#8780) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/8780 Remove a unsed function with typo in function name Reviewed By: larryliu0820 Differential Revision: D70337526 --- exir/dialects/edge/spec/gen.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/exir/dialects/edge/spec/gen.py b/exir/dialects/edge/spec/gen.py index 6a9c8d3caf8..6be6a2ae5ee 100644 --- a/exir/dialects/edge/spec/gen.py +++ b/exir/dialects/edge/spec/gen.py @@ -236,25 +236,6 @@ def print_error_msg(unsupported_funcs: List[str]): print(f) -def is_not_dype_exception(exc: BaseException, dtype_str: str) -> bool: - """Check if an exception about unsupported dtype.""" - - # alias dtype means the alias name of dtype str, like "Boolean" is the alias name of "Bool". - # Set default alias_dtype as twice of str(exc) to make sure default alias dtype is not part of str(exc) - alias_dtype = 2 * str(exc) - if dtype_str == "Bool": - alias_dtype = "Boolean" - - return not ( - ("not supported" in str(exc) or "not implemented" in str(exc)) - and ( - dtype_str in str(exc) - or alias_dtype in str(exc) - or dtype_str.lower() in str(exc) - ) - ) - - class EdgeOpYamlInfo: def __init__( self,