From 7d416161d0775809b2739b1351c17aae1fe666c1 Mon Sep 17 00:00:00 2001 From: Yiqun Liu Date: Mon, 27 Mar 2023 16:39:39 +0800 Subject: [PATCH] Fix the count of number of float32 operators. (#52029) --- tools/parse_kernel_info.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/parse_kernel_info.py b/tools/parse_kernel_info.py index b3b4203daef..ef85a0bb4bb 100644 --- a/tools/parse_kernel_info.py +++ b/tools/parse_kernel_info.py @@ -63,11 +63,11 @@ class KernelRegistryStatistics: } def update(self, supported_dtypes): - for dtype in self.num_ops_for_dtypes.keys(): - if dtype in ["float", "float32"]: - self.num_ops_for_dtypes["float32"] += 1 - elif dtype in supported_dtypes: + for dtype in supported_dtypes: + if dtype in self.num_ops_for_dtypes.keys(): self.num_ops_for_dtypes[dtype] += 1 + elif dtype == "float": + self.num_ops_for_dtypes["float32"] += 1 self.num_ops_for_dtypes["all"] += 1 def __str__(self): -- GitLab