From 1978444e9aa1513e5ce1831199d5c22c1a811998 Mon Sep 17 00:00:00 2001 From: Graham Markall Date: Thu, 21 Aug 2025 16:47:28 +0100 Subject: [PATCH] Remove costly but low-utility assertions I'm not aware of these assertions ever getting triggered by anyone making a mistake with registrations, but they do take a lot of time when the number of registrations is large - this commit thus removes them. --- numba_cuda/numba/cuda/typing/templates.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/numba_cuda/numba/cuda/typing/templates.py b/numba_cuda/numba/cuda/typing/templates.py index d88075da0..fef4ef603 100644 --- a/numba_cuda/numba/cuda/typing/templates.py +++ b/numba_cuda/numba/cuda/typing/templates.py @@ -1359,18 +1359,10 @@ def __init__(self): self.globals = [] def register(self, item): - assert issubclass( - item, - (FunctionTemplate, numba.core.typing.templates.FunctionTemplate), - ) self.functions.append(item) return item def register_attr(self, item): - assert issubclass( - item, - (AttributeTemplate, numba.core.typing.templates.AttributeTemplate), - ) self.attributes.append(item) return item