From aa11de890cac03c3c6812344235d2c205d4e1b88 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Tue, 7 Jun 2022 15:50:54 -0500
Subject: [PATCH] Complain about lengthy build times only once per cl.Program

---
 pyopencl/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py
index 3f8dc83d..6420e5af 100644
--- a/pyopencl/__init__.py
+++ b/pyopencl/__init__.py
@@ -470,6 +470,9 @@ class Program:
                     logger.info("build program: kernel '%s' was part of a "
                             "lengthy %s (%.2f s)" % (attr, build_descr, duration))
 
+                # don't whine about build times more than once.
+                self._build_duration_info = None
+
             return knl
         except LogicError:
             raise AttributeError("'%s' was not found as a program "
-- 
GitLab